Merge lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-yani into lp:openerp-venezuela-localization

Proposed by Yanina Aular (Vauxoo)
Status: Superseded
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-yani
Merge into: lp:openerp-venezuela-localization
Diff against target: 179 lines (+109/-1)
7 files modified
l10n_ve_fiscal_requirements/__openerp__.py (+1/-0)
l10n_ve_fiscal_requirements/model/res_company.py (+0/-1)
l10n_ve_fiscal_requirements/view/partner_view.xml (+1/-0)
l10n_ve_fiscal_requirements/view/res_company_view.xml (+10/-0)
l10n_ve_fiscal_requirements/wizard/__init__.py (+1/-0)
l10n_ve_fiscal_requirements/wizard/wizard_update_name.py (+63/-0)
l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml (+33/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-yani
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Needs Fixing
Review via email: mp+144768@code.launchpad.net

This proposal has been superseded by a proposal from 2013-01-28.

Description of the change

Added a button to the version 6.0 that lets you rename a partner after checking your information with SENIAT, because after this process, you can not change the name of the partner.

To post a comment you must log in.
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Missing file wizard_update_name.py
El archivo faltante: wizard_update_name.py

por favor, agregalo para hacer el merge.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Disculpa, sere mas explicito,

El archivo no esta versionado,
puede que lo tengas en tu repo local
pero lo estes ignorando en el control de versiones.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) :
review: Needs Fixing
809. By Yanina Aular (Vauxoo)

[ADD] update name button

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_fiscal_requirements/__openerp__.py'
2--- l10n_ve_fiscal_requirements/__openerp__.py 2012-12-05 14:45:18 +0000
3+++ l10n_ve_fiscal_requirements/__openerp__.py 2013-01-28 14:14:29 +0000
4@@ -79,6 +79,7 @@
5 'wizard/wizard_nro_ctrl_view.xml',
6 'view/res_company_view.xml',
7 'view/l10n_ut_view.xml',
8+ 'wizard/wizard_update_name_view.xml',
9 'view/partner_view.xml',
10 'view/account_inv_refund_nctrl_view.xml',
11 'view/account_tax_view.xml',
12
13=== modified file 'l10n_ve_fiscal_requirements/model/res_company.py'
14--- l10n_ve_fiscal_requirements/model/res_company.py 2012-12-09 20:02:09 +0000
15+++ l10n_ve_fiscal_requirements/model/res_company.py 2013-01-28 14:14:29 +0000
16@@ -45,7 +45,6 @@
17
18 def write(self, cr, uid, ids, values, context=None):
19 context = context or {}
20- self.cache_restart(cr)
21 context.update({'create_company':True})
22 return super(res_company, self).write(cr, uid, ids, values, context=context)
23
24
25=== modified file 'l10n_ve_fiscal_requirements/view/partner_view.xml'
26--- l10n_ve_fiscal_requirements/view/partner_view.xml 2012-12-14 15:15:40 +0000
27+++ l10n_ve_fiscal_requirements/view/partner_view.xml 2013-01-28 14:14:29 +0000
28@@ -20,6 +20,7 @@
29 <label for="vat"/>
30 <field name="vat" colspan="2" placeholder="e.g. VE123456789" class="oe_inline" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }" />
31 <button name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
32+ <button name="%(action_wiz_name)d" string="Update Name" type='action' icon="gtk-execute" class="oe_inline"/>
33 <field name="uid_country" colspan="2" invisible="1"/>
34 </xpath>
35
36
37=== modified file 'l10n_ve_fiscal_requirements/view/res_company_view.xml'
38--- l10n_ve_fiscal_requirements/view/res_company_view.xml 2012-12-08 20:34:59 +0000
39+++ l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-01-28 14:14:29 +0000
40@@ -8,11 +8,21 @@
41 <field name="priority">24</field>
42 <field name="inherit_id" ref="base.view_company_form"/>
43 <field name="arch" type="xml">
44+
45+ <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="after">
46+ <separator string="Data used by default for invoices damaged" colspan="4"/>
47+ </xpath>
48 <xpath expr="//group[@name='account_grp']" position="after">
49 <group name='fr1_grp' string='Damaged Invoices Info'>
50+
51 <field name="jour_id"/>
52+
53+ <field name="acc_id"/>
54+ <newline/>
55+
56 <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/>
57 </group>
58+
59 </xpath>
60 </field>
61 </record>
62
63=== modified file 'l10n_ve_fiscal_requirements/wizard/__init__.py'
64--- l10n_ve_fiscal_requirements/wizard/__init__.py 2012-01-18 22:53:40 +0000
65+++ l10n_ve_fiscal_requirements/wizard/__init__.py 2013-01-28 14:14:29 +0000
66@@ -26,6 +26,7 @@
67 import wizard_nro_ctrl
68 import wizard_invoice_nro_ctrl
69 import wizard_url_seniat
70+import wizard_update_name
71 import update_info_partner
72 import account_invoice_refund
73 import account_invoice_debit
74
75=== added file 'l10n_ve_fiscal_requirements/wizard/wizard_update_name.py'
76--- l10n_ve_fiscal_requirements/wizard/wizard_update_name.py 1970-01-01 00:00:00 +0000
77+++ l10n_ve_fiscal_requirements/wizard/wizard_update_name.py 2013-01-28 14:14:29 +0000
78@@ -0,0 +1,63 @@
79+#!/usr/bin/python
80+# -*- encoding: utf-8 -*-
81+###########################################################################
82+# Module Writen to OpenERP, Open Source Management Solution
83+# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
84+# All Rights Reserved
85+###############Credits######################################################
86+# Coded by: Yanina Aular <yanina.aular@vauxoo.com>
87+# Planified by: Humberto Arocha
88+# Audited by: Vauxoo C.A.
89+#############################################################################
90+# This program is free software: you can redistribute it and/or modify
91+# it under the terms of the GNU Affero General Public License as published by
92+# the Free Software Foundation, either version 3 of the License, or
93+# (at your option) any later version.
94+#
95+# This program is distributed in the hope that it will be useful,
96+# but WITHOUT ANY WARRANTY; without even the implied warranty of
97+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98+# GNU Affero General Public License for more details.
99+#
100+# You should have received a copy of the GNU Affero General Public License
101+# along with this program. If not, see <http://www.gnu.org/licenses/>.
102+################################################################################
103+
104+from osv import osv
105+from osv import fields
106+from tools.translate import _
107+
108+class wiz_updatename(osv.osv_memory):
109+ _name = 'wiz.updatename'
110+ _description = "Wizard that changes the partner name"
111+
112+ def set_name(self, cr, uid, ids, context):
113+ data = self.pool.get('wiz.updatename').read(cr, uid, ids)[0]
114+ print ids
115+ if not data['sure']:
116+ raise osv.except_osv(_("Error!"), _("Please confirm that you want to do this by checking the option"))
117+
118+ partner_obj = self.pool.get('res.partner')
119+ name_partner = data['name']
120+
121+ partner_obj.write(cr, uid, context['active_id'], {'name': name_partner}, context=context)
122+ return {}
123+
124+ _columns = {
125+ 'name': fields.char('Name', 256, required=True),
126+ 'sure': fields.boolean('Are you sure?'),
127+ }
128+
129+ def _get_name(self, cr, uid, context=None):
130+ if context is None:
131+ context = {}
132+ partner_obj = self.pool.get('res.partner')
133+ partner = partner_obj.search(cr, uid, [('id', '=', context['active_id'])])
134+ partner_o = partner_obj.browse(cr, uid, partner[0])
135+ return partner_o and partner_o.name or False
136+
137+ _defaults = {
138+ 'name': _get_name,
139+ }
140+
141+wiz_updatename()
142
143=== added file 'l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml'
144--- l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml 1970-01-01 00:00:00 +0000
145+++ l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml 2013-01-28 14:14:29 +0000
146@@ -0,0 +1,33 @@
147+<?xml version="1.0" encoding="utf-8"?>
148+<openerp>
149+ <data>
150+ <record model="ir.ui.view" id="wizard_name_form">
151+ <field name="name">wizard.updatename.form</field>
152+ <field name="model">wiz.updatename</field>
153+ <field name="type">form</field>
154+ <field name="arch" type="xml">
155+ <form string="Changing the Name" version="7.0">
156+ <field name="name" colspan="4" />
157+ <separator string="Are you sure you want to do this?" colspan="4" />
158+ <field name="sure" />
159+
160+ <footer>
161+ <button name="set_name" string="Confirm" type="object" icon="terp-check" class="oe_link"/>
162+ or
163+ <button special='cancel' string="Cancel" icon="terp-gtk-stop" class="oe_highlight"/>
164+ </footer>
165+ </form>
166+ </field>
167+ </record>
168+
169+ <record id="action_wiz_name" model="ir.actions.act_window">
170+ <field name="name">Change name</field>
171+ <field name="type">ir.actions.act_window</field>
172+ <field name="res_model">wiz.updatename</field>
173+ <field name="view_type">form</field>
174+ <field name="view_mode">form</field>
175+ <field name="target">new</field>
176+ </record>
177+
178+ </data>
179+</openerp>