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

Proposed by Yanina Aular (Vauxoo)
Status: Merged
Merged at revision: 822
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/ovl70-rev-taskovl-yani
Merge into: lp:openerp-venezuela-localization
Diff against target: 243 lines (+90/-11)
10 files modified
l10n_ve_fiscal_requirements/__openerp__.py (+1/-0)
l10n_ve_fiscal_requirements/demo/journal_demo.xml (+50/-0)
l10n_ve_fiscal_requirements/model/invoice.py (+18/-1)
l10n_ve_fiscal_requirements/model/res_company.py (+2/-1)
l10n_ve_fiscal_requirements/view/account_invoice_view.xml (+13/-4)
l10n_ve_fiscal_requirements/view/res_company_view.xml (+4/-1)
l10n_ve_withholding/model/l10n_ve_withholding.py (+1/-1)
l10n_ve_withholding_iva/model/generate_txt.py (+0/-1)
l10n_ve_withholding_iva/report/__init__.py (+1/-1)
l10n_ve_withholding_src/model/partner.py (+0/-1)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-rev-taskovl-yani
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Approve
Review via email: mp+160938@code.launchpad.net

This proposal supersedes a proposal from 2013-04-18.

Description of the change

localization improvements, bug fixes

To post a comment you must log in.
Revision history for this message
Yanina Aular (Vauxoo) (yanina-aular) wrote : Posted in a previous version of this proposal

localization improvements, bug fixes

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 2013-04-12 21:29:36 +0000
+++ l10n_ve_fiscal_requirements/__openerp__.py 2013-04-25 15:51:30 +0000
@@ -88,6 +88,7 @@
88 ],88 ],
89 'demo_xml': [89 'demo_xml': [
90 'demo/demo_partners.xml',90 'demo/demo_partners.xml',
91 'demo/journal_demo.xml',
91 ],92 ],
92 'test': [93 'test': [
93 'test/control_number.yml',94 'test/control_number.yml',
9495
=== added file 'l10n_ve_fiscal_requirements/demo/journal_demo.xml'
--- l10n_ve_fiscal_requirements/demo/journal_demo.xml 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/demo/journal_demo.xml 2013-04-25 15:51:30 +0000
@@ -0,0 +1,50 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4
5 <!-- Sequences -->
6
7 <record id="seq_debit_purchase_type" model="ir.sequence.type">
8 <field name="name">Nota Debito Compra</field>
9 <field name="code">account.journal.debit.purchase</field>
10 </record>
11
12 <record id="seq_debit_purchase_journal" model="ir.sequence">
13 <field name="name">Nota de debito Compra</field>
14 <field name="code">account.journal.debit.purchase</field>
15 <field name="prefix">RE:</field>
16 <field name="padding">6</field>
17 <field name="number_increment">1</field>
18 </record>
19
20 <record id="seq_debit_sale_type" model="ir.sequence.type">
21 <field name="name">Nota Debito Venta</field>
22 <field name="code">account.journal.debit.sale</field>
23 </record>
24
25 <record id="seq_debit_sale_journal" model="ir.sequence">
26 <field name="name">Nota de debito Venta</field>
27 <field name="code">account.journal.debit.sale</field>
28 <field name="prefix">RE:</field>
29 <field name="padding">6</field>
30 <field name="number_increment">1</field>
31 </record>
32
33 <!-- Journal -->
34
35 <record id="debit_purchase_journal" model="account.journal">
36 <field name="name">DIARIO DE NOTA DE DEBITO COMPRA</field>
37 <field name="code">DBT1</field>
38 <field name="type">purchase_debit</field>
39 <field name="sequence_id" ref="seq_debit_purchase_journal"/>
40 </record>
41
42 <record id="debit_sale_journal" model="account.journal">
43 <field name="name">DIARIO DE NOTA DE DEBITO VENTA</field>
44 <field name="code">DBT2</field>
45 <field name="type">sale_debit</field>
46 <field name="sequence_id" ref="seq_debit_sale_journal"/>
47 </record>
48
49 </data>
50</openerp>
051
=== modified file 'l10n_ve_fiscal_requirements/model/invoice.py'
--- l10n_ve_fiscal_requirements/model/invoice.py 2013-04-16 15:45:09 +0000
+++ l10n_ve_fiscal_requirements/model/invoice.py 2013-04-25 15:51:30 +0000
@@ -72,6 +72,18 @@
72 return False72 return False
73 return True73 return True
7474
75 def _get_loc_req(self, cr, uid, context=None):
76 """Get if a field is required or not by a Localization
77 @param uid: Integer value of the user
78 """
79 context = context or {}
80 res = False
81 rc_obj = self.pool.get('res.company')
82 rc_brw = rc_obj.browse(cr, uid, uid, context=context)
83
84 if rc_brw.country_id and rc_brw.country_id.code == 'VE' and rc_brw.printer_fiscal:
85 res = True
86 return res
7587
76 _inherit = 'account.invoice'88 _inherit = 'account.invoice'
77 _columns = {89 _columns = {
@@ -84,9 +96,14 @@
84 'invoice_printer' : fields.char('Fiscal printer invoice number', size=64, required=False,help="Fiscal printer invoice number, is the number of the invoice on the fiscal printer"),96 'invoice_printer' : fields.char('Fiscal printer invoice number', size=64, required=False,help="Fiscal printer invoice number, is the number of the invoice on the fiscal printer"),
85 #TODO": maybe it must be a many2one to declared FiscalPrinter when FiscalV is ready97 #TODO": maybe it must be a many2one to declared FiscalPrinter when FiscalV is ready
86 'fiscal_printer' : fields.char('Fiscal printer number', size=64, required=False,help="Fiscal printer number, generally is the id number of the printer."),98 'fiscal_printer' : fields.char('Fiscal printer number', size=64, required=False,help="Fiscal printer number, generally is the id number of the printer."),
8799 'loc_req':fields.boolean('Required by Localization', help='This fields is for technical use'),
88 }100 }
89101
102 _defaults ={
103 'loc_req': _get_loc_req
104 }
105
106
90 _constraints = [107 _constraints = [
91 (_unique_invoice_per_partner, _('The Document you have been entering for this Partner has already been recorded'),['Control Number (nro_ctrl)','Reference (reference)']),108 (_unique_invoice_per_partner, _('The Document you have been entering for this Partner has already been recorded'),['Control Number (nro_ctrl)','Reference (reference)']),
92 ]109 ]
93110
=== modified file 'l10n_ve_fiscal_requirements/model/res_company.py'
--- l10n_ve_fiscal_requirements/model/res_company.py 2013-03-26 23:24:31 +0000
+++ l10n_ve_fiscal_requirements/model/res_company.py 2013-04-25 15:51:30 +0000
@@ -36,7 +36,8 @@
36 _columns = {36 _columns = {
37 'jour_id': fields.many2one('account.journal', 'Journal', required=False, help="Default journal for damaged invoices"),37 'jour_id': fields.many2one('account.journal', 'Journal', required=False, help="Default journal for damaged invoices"),
38 'acc_id': fields.many2one('account.account', 'Account', required=False, help="Default account used for invoices and lines from damaged invoices"),38 'acc_id': fields.many2one('account.account', 'Account', required=False, help="Default account used for invoices and lines from damaged invoices"),
39 }39 'printer_fiscal' : fields.boolean('Manages fiscal printer', help='Indicates that the company can operate a fiscal printer'),
40 }
4041
41 def create(self, cr, uid, vals, context=None):42 def create(self, cr, uid, vals, context=None):
42 '''43 '''
4344
=== modified file 'l10n_ve_fiscal_requirements/view/account_invoice_view.xml'
--- l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-04-16 20:53:35 +0000
+++ l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-04-25 15:51:30 +0000
@@ -26,19 +26,27 @@
26 </group>26 </group>
27 <newline/>27 <newline/>
28 </xpath>28 </xpath>
29
29 <xpath expr="//page[@string='Payments']" position="after">30 <xpath expr="//page[@string='Payments']" position="after">
30 <page string="Debit-Credit Notes">31 <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}">
31 <newline/>32 <newline/>
32 <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>33 <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
33 </page>34 </page>
34 </xpath>35 </xpath>
36
35 <xpath expr="//page[@string='Other Info']/group/group[2]" position="after">37 <xpath expr="//page[@string='Other Info']/group/group[2]" position="after">
36 38
37 <group colspan="2" >39 <group colspan="2" >
38 <separator colspan="6" string="Fiscal Information"/>40 <separator colspan="6" string="Fiscal Information"/>
39 <field name="sin_cred" />41 <field name="sin_cred" />
40 <field name="invoice_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>42 <!--
43 <field name="invoice_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>
41 <field name="fiscal_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>44 <field name="fiscal_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>
45 -->
46 <field name="loc_req" invisible="1"/>
47 <field name="invoice_printer" attrs="{'required':[('loc_req','=',True)]}"/>
48 <field name="fiscal_printer" attrs="{'required':[('loc_req','=',True)]}"/>
49
42 <field name="parent_id" 50 <field name="parent_id"
43 attrs="{'required':[('type','=','out_refund')]}" 51 attrs="{'required':[('type','=','out_refund')]}"
44 domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>52 domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
@@ -152,15 +160,16 @@
152 <field name="address_invoice_id" domain="[('partner_id','=',partner_id), ('type','=','invoice')]"/>160 <field name="address_invoice_id" domain="[('partner_id','=',partner_id), ('type','=','invoice')]"/>
153 </xpath>161 </xpath>
154-->162-->
155163
156 <xpath expr="//page[@string='Payments']" position="after">164 <xpath expr="//page[@string='Payments']" position="after">
157 <page string="Debit-Credit Notes">165 <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}">
158 <field name="child_ids" 166 <field name="child_ids"
159 nolabel="1" 167 nolabel="1"
160 widget="many2many" 168 widget="many2many"
161 domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['in_invoice', 'in_refund'])]"/>169 domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['in_invoice', 'in_refund'])]"/>
162 </page>170 </page>
163 </xpath>171 </xpath>
172
164 <xpath expr="//button[@string='Refund Invoice']" position="after">173 <xpath expr="//button[@string='Refund Invoice']" position="after">
165 <button name="%(action_account_invoice_debit)d" 174 <button name="%(action_account_invoice_debit)d"
166 type='action' 175 type='action'
167176
=== modified file 'l10n_ve_fiscal_requirements/view/res_company_view.xml'
--- l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-01-08 14:55:04 +0000
+++ l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-04-25 15:51:30 +0000
@@ -9,6 +9,10 @@
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">
1111
12 <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="inside">
13 <field name="printer_fiscal"/>
14 </xpath>
15
12 <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="after">16 <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="after">
13 <separator string="Data used by default for invoices damaged" colspan="4"/>17 <separator string="Data used by default for invoices damaged" colspan="4"/>
14 </xpath>18 </xpath>
@@ -17,7 +21,6 @@
1721
18 <field name="jour_id"/>22 <field name="jour_id"/>
1923
20 <field name="acc_id"/>
21 <newline/>24 <newline/>
2225
23 <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/>26 <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/>
2427
=== modified file 'l10n_ve_withholding/model/l10n_ve_withholding.py'
--- l10n_ve_withholding/model/l10n_ve_withholding.py 2013-03-20 21:00:03 +0000
+++ l10n_ve_withholding/model/l10n_ve_withholding.py 2013-04-25 15:51:30 +0000
@@ -27,7 +27,7 @@
2727
2828
29class account_wh_doc(osv.osv):29class account_wh_doc(osv.osv):
30 _description = 'With holding document'30 _description = 'Withholding document'
31 _name = 'account.wh.doc'31 _name = 'account.wh.doc'
32 _columns = {32 _columns = {
33 'model_parent': fields.char('Parent Object', size=64, required=True, select=1, help="parent for relationship between withholding"),33 'model_parent': fields.char('Parent Object', size=64, required=True, select=1, help="parent for relationship between withholding"),
3434
=== modified file 'l10n_ve_withholding_iva/model/generate_txt.py'
--- l10n_ve_withholding_iva/model/generate_txt.py 2013-03-21 15:58:01 +0000
+++ l10n_ve_withholding_iva/model/generate_txt.py 2013-04-25 15:51:30 +0000
@@ -75,7 +75,6 @@
75 'type':fields.boolean('Retention Suppliers?',required=True,states={'draft':[('readonly',False)]}, help="Select the type of retention to make"),75 'type':fields.boolean('Retention Suppliers?',required=True,states={'draft':[('readonly',False)]}, help="Select the type of retention to make"),
76 'date_start': fields.date('Begin Date',required=True,states={'draft':[('readonly',False)]}, help="Begin date of period"),76 'date_start': fields.date('Begin Date',required=True,states={'draft':[('readonly',False)]}, help="Begin date of period"),
77 'date_end': fields.date('End date', required=True,states={'draft':[('readonly',False)]}, help="End date of period"),77 'date_end': fields.date('End date', required=True,states={'draft':[('readonly',False)]}, help="End date of period"),
78 'type':fields.boolean('Retención Proveedores?',required=True,states={'draft':[('readonly',False)]}, help="Select the type of retention to make"),
79 'txt_ids':fields.one2many('txt.iva.line','txt_id', readonly=True,states={'draft':[('readonly',False)]}, help='Txt field lines of ar required by SENIAT for VAT withholding'),78 'txt_ids':fields.one2many('txt.iva.line','txt_id', readonly=True,states={'draft':[('readonly',False)]}, help='Txt field lines of ar required by SENIAT for VAT withholding'),
80 'amount_total_ret':fields.function(_get_amount_total,method=True, digits=(16, 2), readonly=True, string=' Total Monto de Retencion', help="Monto Total Retenido"),79 'amount_total_ret':fields.function(_get_amount_total,method=True, digits=(16, 2), readonly=True, string=' Total Monto de Retencion', help="Monto Total Retenido"),
81 'amount_total_base':fields.function(_get_amount_total_base,method=True, digits=(16, 2), readonly=True, string='Total Base Imponible', help="Total de la Base Imponible"),80 'amount_total_base':fields.function(_get_amount_total_base,method=True, digits=(16, 2), readonly=True, string='Total Base Imponible', help="Total de la Base Imponible"),
8281
=== modified file 'l10n_ve_withholding_iva/report/__init__.py'
--- l10n_ve_withholding_iva/report/__init__.py 2011-10-28 17:13:52 +0000
+++ l10n_ve_withholding_iva/report/__init__.py 2013-04-25 15:51:30 +0000
@@ -26,4 +26,4 @@
26##############################################################################26##############################################################################
2727
28import list_wh_iva28import list_wh_iva
29import wittholding_vat29import withholding_vat
3030
=== renamed file 'l10n_ve_withholding_iva/report/wittholding_vat.py' => 'l10n_ve_withholding_iva/report/withholding_vat.py'
=== modified file 'l10n_ve_withholding_src/model/partner.py'
--- l10n_ve_withholding_src/model/partner.py 2013-04-16 20:27:37 +0000
+++ l10n_ve_withholding_src/model/partner.py 2013-04-25 15:51:30 +0000
@@ -31,7 +31,6 @@
3131
32class res_partner(osv.osv):32class res_partner(osv.osv):
33 _inherit = 'res.partner'33 _inherit = 'res.partner'
34 logger = netsvc.Logger()
35 _columns = {34 _columns = {
36 'wh_src_agent': fields.boolean('SRC Wh. Agent', help="Indicate if the partner is a SRC withholding agent"),35 'wh_src_agent': fields.boolean('SRC Wh. Agent', help="Indicate if the partner is a SRC withholding agent"),
37 'wh_src_rate': fields.float(string='SRC Rate', digits_compute= dp.get_precision('Withhold'), help="SRC Withholding rate"),36 'wh_src_rate': fields.float(string='SRC Rate', digits_compute= dp.get_precision('Withhold'), help="SRC Withholding rate"),