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

Proposed by Yanina Aular (Vauxoo)
Status: Merged
Merged at revision: 777
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 Approve
Review via email: mp+145189@code.launchpad.net

This proposal supersedes a proposal from 2013-01-24.

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_ve_fiscal_requirements/__openerp__.py'
--- l10n_ve_fiscal_requirements/__openerp__.py 2012-12-05 14:45:18 +0000
+++ l10n_ve_fiscal_requirements/__openerp__.py 2013-01-28 14:20:27 +0000
@@ -79,6 +79,7 @@
79 'wizard/wizard_nro_ctrl_view.xml',79 'wizard/wizard_nro_ctrl_view.xml',
80 'view/res_company_view.xml',80 'view/res_company_view.xml',
81 'view/l10n_ut_view.xml',81 'view/l10n_ut_view.xml',
82 'wizard/wizard_update_name_view.xml',
82 'view/partner_view.xml',83 'view/partner_view.xml',
83 'view/account_inv_refund_nctrl_view.xml',84 'view/account_inv_refund_nctrl_view.xml',
84 'view/account_tax_view.xml',85 'view/account_tax_view.xml',
8586
=== modified file 'l10n_ve_fiscal_requirements/model/res_company.py'
--- l10n_ve_fiscal_requirements/model/res_company.py 2012-12-09 20:02:09 +0000
+++ l10n_ve_fiscal_requirements/model/res_company.py 2013-01-28 14:20:27 +0000
@@ -45,7 +45,6 @@
45 45
46 def write(self, cr, uid, ids, values, context=None):46 def write(self, cr, uid, ids, values, context=None):
47 context = context or {}47 context = context or {}
48 self.cache_restart(cr)
49 context.update({'create_company':True})48 context.update({'create_company':True})
50 return super(res_company, self).write(cr, uid, ids, values, context=context)49 return super(res_company, self).write(cr, uid, ids, values, context=context)
5150
5251
=== modified file 'l10n_ve_fiscal_requirements/view/partner_view.xml'
--- l10n_ve_fiscal_requirements/view/partner_view.xml 2012-12-14 15:15:40 +0000
+++ l10n_ve_fiscal_requirements/view/partner_view.xml 2013-01-28 14:20:27 +0000
@@ -20,6 +20,7 @@
20 <label for="vat"/>20 <label for="vat"/>
21 <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)] }" />21 <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)] }" />
22 <button name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>22 <button name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
23 <button name="%(action_wiz_name)d" string="Update Name" type='action' icon="gtk-execute" class="oe_inline"/>
23 <field name="uid_country" colspan="2" invisible="1"/>24 <field name="uid_country" colspan="2" invisible="1"/>
24 </xpath>25 </xpath>
2526
2627
=== modified file 'l10n_ve_fiscal_requirements/view/res_company_view.xml'
--- l10n_ve_fiscal_requirements/view/res_company_view.xml 2012-12-08 20:34:59 +0000
+++ l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-01-28 14:20:27 +0000
@@ -8,11 +8,21 @@
8 <field name="priority">24</field>8 <field name="priority">24</field>
9 <field name="inherit_id" ref="base.view_company_form"/>9 <field name="inherit_id" ref="base.view_company_form"/>
10 <field name="arch" type="xml">10 <field name="arch" type="xml">
11
12 <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="after">
13 <separator string="Data used by default for invoices damaged" colspan="4"/>
14 </xpath>
11 <xpath expr="//group[@name='account_grp']" position="after">15 <xpath expr="//group[@name='account_grp']" position="after">
12 <group name='fr1_grp' string='Damaged Invoices Info'>16 <group name='fr1_grp' string='Damaged Invoices Info'>
17
13 <field name="jour_id"/>18 <field name="jour_id"/>
19
20 <field name="acc_id"/>
21 <newline/>
22
14 <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/>23 <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/>
15 </group>24 </group>
25
16 </xpath>26 </xpath>
17 </field>27 </field>
18 </record>28 </record>
1929
=== modified file 'l10n_ve_fiscal_requirements/wizard/__init__.py'
--- l10n_ve_fiscal_requirements/wizard/__init__.py 2012-01-18 22:53:40 +0000
+++ l10n_ve_fiscal_requirements/wizard/__init__.py 2013-01-28 14:20:27 +0000
@@ -26,6 +26,7 @@
26import wizard_nro_ctrl26import wizard_nro_ctrl
27import wizard_invoice_nro_ctrl27import wizard_invoice_nro_ctrl
28import wizard_url_seniat28import wizard_url_seniat
29import wizard_update_name
29import update_info_partner30import update_info_partner
30import account_invoice_refund31import account_invoice_refund
31import account_invoice_debit32import account_invoice_debit
3233
=== added file 'l10n_ve_fiscal_requirements/wizard/wizard_update_name.py'
--- l10n_ve_fiscal_requirements/wizard/wizard_update_name.py 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/wizard/wizard_update_name.py 2013-01-28 14:20:27 +0000
@@ -0,0 +1,63 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###########################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
6# All Rights Reserved
7###############Credits######################################################
8# Coded by: Yanina Aular <yanina.aular@vauxoo.com>
9# Planified by: Humberto Arocha
10# Audited by: Vauxoo C.A.
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24################################################################################
25
26from osv import osv
27from osv import fields
28from tools.translate import _
29
30class wiz_updatename(osv.osv_memory):
31 _name = 'wiz.updatename'
32 _description = "Wizard that changes the partner name"
33
34 def set_name(self, cr, uid, ids, context):
35 data = self.pool.get('wiz.updatename').read(cr, uid, ids)[0]
36 print ids
37 if not data['sure']:
38 raise osv.except_osv(_("Error!"), _("Please confirm that you want to do this by checking the option"))
39
40 partner_obj = self.pool.get('res.partner')
41 name_partner = data['name']
42
43 partner_obj.write(cr, uid, context['active_id'], {'name': name_partner}, context=context)
44 return {}
45
46 _columns = {
47 'name': fields.char('Name', 256, required=True),
48 'sure': fields.boolean('Are you sure?'),
49 }
50
51 def _get_name(self, cr, uid, context=None):
52 if context is None:
53 context = {}
54 partner_obj = self.pool.get('res.partner')
55 partner = partner_obj.search(cr, uid, [('id', '=', context['active_id'])])
56 partner_o = partner_obj.browse(cr, uid, partner[0])
57 return partner_o and partner_o.name or False
58
59 _defaults = {
60 'name': _get_name,
61 }
62
63wiz_updatename()
064
=== added file 'l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml'
--- l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/wizard/wizard_update_name_view.xml 2013-01-28 14:20:27 +0000
@@ -0,0 +1,33 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record model="ir.ui.view" id="wizard_name_form">
5 <field name="name">wizard.updatename.form</field>
6 <field name="model">wiz.updatename</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">
9 <form string="Changing the Name" version="7.0">
10 <field name="name" colspan="4" />
11 <separator string="Are you sure you want to do this?" colspan="4" />
12 <field name="sure" />
13
14 <footer>
15 <button name="set_name" string="Confirm" type="object" icon="terp-check" class="oe_link"/>
16 or
17 <button special='cancel' string="Cancel" icon="terp-gtk-stop" class="oe_highlight"/>
18 </footer>
19 </form>
20 </field>
21 </record>
22
23 <record id="action_wiz_name" model="ir.actions.act_window">
24 <field name="name">Change name</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">wiz.updatename</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="target">new</field>
30 </record>
31
32 </data>
33</openerp>