Merge lp:~vauxoo/openerp-venezuela-localization/ovl70-rev-taskovl-yani into lp:openerp-venezuela-localization
- ovl70-rev-taskovl-yani
- Merge into trunk
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 |
Related bugs: |
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.
Commit message
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 | # |
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
1 | === modified file 'l10n_ve_fiscal_requirements/__openerp__.py' | |||
2 | --- l10n_ve_fiscal_requirements/__openerp__.py 2013-04-12 21:29:36 +0000 | |||
3 | +++ l10n_ve_fiscal_requirements/__openerp__.py 2013-04-25 15:51:30 +0000 | |||
4 | @@ -88,6 +88,7 @@ | |||
5 | 88 | ], | 88 | ], |
6 | 89 | 'demo_xml': [ | 89 | 'demo_xml': [ |
7 | 90 | 'demo/demo_partners.xml', | 90 | 'demo/demo_partners.xml', |
8 | 91 | 'demo/journal_demo.xml', | ||
9 | 91 | ], | 92 | ], |
10 | 92 | 'test': [ | 93 | 'test': [ |
11 | 93 | 'test/control_number.yml', | 94 | 'test/control_number.yml', |
12 | 94 | 95 | ||
13 | === added file 'l10n_ve_fiscal_requirements/demo/journal_demo.xml' | |||
14 | --- l10n_ve_fiscal_requirements/demo/journal_demo.xml 1970-01-01 00:00:00 +0000 | |||
15 | +++ l10n_ve_fiscal_requirements/demo/journal_demo.xml 2013-04-25 15:51:30 +0000 | |||
16 | @@ -0,0 +1,50 @@ | |||
17 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
18 | 2 | <openerp> | ||
19 | 3 | <data noupdate="1"> | ||
20 | 4 | |||
21 | 5 | <!-- Sequences --> | ||
22 | 6 | |||
23 | 7 | <record id="seq_debit_purchase_type" model="ir.sequence.type"> | ||
24 | 8 | <field name="name">Nota Debito Compra</field> | ||
25 | 9 | <field name="code">account.journal.debit.purchase</field> | ||
26 | 10 | </record> | ||
27 | 11 | |||
28 | 12 | <record id="seq_debit_purchase_journal" model="ir.sequence"> | ||
29 | 13 | <field name="name">Nota de debito Compra</field> | ||
30 | 14 | <field name="code">account.journal.debit.purchase</field> | ||
31 | 15 | <field name="prefix">RE:</field> | ||
32 | 16 | <field name="padding">6</field> | ||
33 | 17 | <field name="number_increment">1</field> | ||
34 | 18 | </record> | ||
35 | 19 | |||
36 | 20 | <record id="seq_debit_sale_type" model="ir.sequence.type"> | ||
37 | 21 | <field name="name">Nota Debito Venta</field> | ||
38 | 22 | <field name="code">account.journal.debit.sale</field> | ||
39 | 23 | </record> | ||
40 | 24 | |||
41 | 25 | <record id="seq_debit_sale_journal" model="ir.sequence"> | ||
42 | 26 | <field name="name">Nota de debito Venta</field> | ||
43 | 27 | <field name="code">account.journal.debit.sale</field> | ||
44 | 28 | <field name="prefix">RE:</field> | ||
45 | 29 | <field name="padding">6</field> | ||
46 | 30 | <field name="number_increment">1</field> | ||
47 | 31 | </record> | ||
48 | 32 | |||
49 | 33 | <!-- Journal --> | ||
50 | 34 | |||
51 | 35 | <record id="debit_purchase_journal" model="account.journal"> | ||
52 | 36 | <field name="name">DIARIO DE NOTA DE DEBITO COMPRA</field> | ||
53 | 37 | <field name="code">DBT1</field> | ||
54 | 38 | <field name="type">purchase_debit</field> | ||
55 | 39 | <field name="sequence_id" ref="seq_debit_purchase_journal"/> | ||
56 | 40 | </record> | ||
57 | 41 | |||
58 | 42 | <record id="debit_sale_journal" model="account.journal"> | ||
59 | 43 | <field name="name">DIARIO DE NOTA DE DEBITO VENTA</field> | ||
60 | 44 | <field name="code">DBT2</field> | ||
61 | 45 | <field name="type">sale_debit</field> | ||
62 | 46 | <field name="sequence_id" ref="seq_debit_sale_journal"/> | ||
63 | 47 | </record> | ||
64 | 48 | |||
65 | 49 | </data> | ||
66 | 50 | </openerp> | ||
67 | 0 | 51 | ||
68 | === modified file 'l10n_ve_fiscal_requirements/model/invoice.py' | |||
69 | --- l10n_ve_fiscal_requirements/model/invoice.py 2013-04-16 15:45:09 +0000 | |||
70 | +++ l10n_ve_fiscal_requirements/model/invoice.py 2013-04-25 15:51:30 +0000 | |||
71 | @@ -72,6 +72,18 @@ | |||
72 | 72 | return False | 72 | return False |
73 | 73 | return True | 73 | return True |
74 | 74 | 74 | ||
75 | 75 | def _get_loc_req(self, cr, uid, context=None): | ||
76 | 76 | """Get if a field is required or not by a Localization | ||
77 | 77 | @param uid: Integer value of the user | ||
78 | 78 | """ | ||
79 | 79 | context = context or {} | ||
80 | 80 | res = False | ||
81 | 81 | rc_obj = self.pool.get('res.company') | ||
82 | 82 | rc_brw = rc_obj.browse(cr, uid, uid, context=context) | ||
83 | 83 | |||
84 | 84 | if rc_brw.country_id and rc_brw.country_id.code == 'VE' and rc_brw.printer_fiscal: | ||
85 | 85 | res = True | ||
86 | 86 | return res | ||
87 | 75 | 87 | ||
88 | 76 | _inherit = 'account.invoice' | 88 | _inherit = 'account.invoice' |
89 | 77 | _columns = { | 89 | _columns = { |
90 | @@ -84,9 +96,14 @@ | |||
91 | 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"), |
92 | 85 | #TODO": maybe it must be a many2one to declared FiscalPrinter when FiscalV is ready | 97 | #TODO": maybe it must be a many2one to declared FiscalPrinter when FiscalV is ready |
93 | 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."), |
95 | 87 | 99 | 'loc_req':fields.boolean('Required by Localization', help='This fields is for technical use'), | |
96 | 88 | } | 100 | } |
97 | 89 | 101 | ||
98 | 102 | _defaults ={ | ||
99 | 103 | 'loc_req': _get_loc_req | ||
100 | 104 | } | ||
101 | 105 | |||
102 | 106 | |||
103 | 90 | _constraints = [ | 107 | _constraints = [ |
104 | 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)']), |
105 | 92 | ] | 109 | ] |
106 | 93 | 110 | ||
107 | === modified file 'l10n_ve_fiscal_requirements/model/res_company.py' | |||
108 | --- l10n_ve_fiscal_requirements/model/res_company.py 2013-03-26 23:24:31 +0000 | |||
109 | +++ l10n_ve_fiscal_requirements/model/res_company.py 2013-04-25 15:51:30 +0000 | |||
110 | @@ -36,7 +36,8 @@ | |||
111 | 36 | _columns = { | 36 | _columns = { |
112 | 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"), |
113 | 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"), |
115 | 39 | } | 39 | 'printer_fiscal' : fields.boolean('Manages fiscal printer', help='Indicates that the company can operate a fiscal printer'), |
116 | 40 | } | ||
117 | 40 | 41 | ||
118 | 41 | def create(self, cr, uid, vals, context=None): | 42 | def create(self, cr, uid, vals, context=None): |
119 | 42 | ''' | 43 | ''' |
120 | 43 | 44 | ||
121 | === modified file 'l10n_ve_fiscal_requirements/view/account_invoice_view.xml' | |||
122 | --- l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-04-16 20:53:35 +0000 | |||
123 | +++ l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-04-25 15:51:30 +0000 | |||
124 | @@ -26,19 +26,27 @@ | |||
125 | 26 | </group> | 26 | </group> |
126 | 27 | <newline/> | 27 | <newline/> |
127 | 28 | </xpath> | 28 | </xpath> |
128 | 29 | |||
129 | 29 | <xpath expr="//page[@string='Payments']" position="after"> | 30 | <xpath expr="//page[@string='Payments']" position="after"> |
131 | 30 | <page string="Debit-Credit Notes"> | 31 | <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}"> |
132 | 31 | <newline/> | 32 | <newline/> |
133 | 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'])]"/> |
134 | 33 | </page> | 34 | </page> |
135 | 34 | </xpath> | 35 | </xpath> |
136 | 36 | |||
137 | 35 | <xpath expr="//page[@string='Other Info']/group/group[2]" position="after"> | 37 | <xpath expr="//page[@string='Other Info']/group/group[2]" position="after"> |
138 | 36 | 38 | ||
139 | 37 | <group colspan="2" > | 39 | <group colspan="2" > |
140 | 38 | <separator colspan="6" string="Fiscal Information"/> | 40 | <separator colspan="6" string="Fiscal Information"/> |
141 | 39 | <field name="sin_cred" /> | 41 | <field name="sin_cred" /> |
143 | 40 | <field name="invoice_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/> | 42 | <!-- |
144 | 43 | <field name="invoice_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/> | ||
145 | 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"/> |
146 | 45 | --> | ||
147 | 46 | <field name="loc_req" invisible="1"/> | ||
148 | 47 | <field name="invoice_printer" attrs="{'required':[('loc_req','=',True)]}"/> | ||
149 | 48 | <field name="fiscal_printer" attrs="{'required':[('loc_req','=',True)]}"/> | ||
150 | 49 | |||
151 | 42 | <field name="parent_id" | 50 | <field name="parent_id" |
152 | 43 | attrs="{'required':[('type','=','out_refund')]}" | 51 | attrs="{'required':[('type','=','out_refund')]}" |
153 | 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'])]"/> |
154 | @@ -152,15 +160,16 @@ | |||
155 | 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')]"/> |
156 | 153 | </xpath> | 161 | </xpath> |
157 | 154 | --> | 162 | --> |
159 | 155 | 163 | ||
160 | 156 | <xpath expr="//page[@string='Payments']" position="after"> | 164 | <xpath expr="//page[@string='Payments']" position="after"> |
162 | 157 | <page string="Debit-Credit Notes"> | 165 | <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}"> |
163 | 158 | <field name="child_ids" | 166 | <field name="child_ids" |
164 | 159 | nolabel="1" | 167 | nolabel="1" |
165 | 160 | widget="many2many" | 168 | widget="many2many" |
166 | 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'])]"/> |
167 | 162 | </page> | 170 | </page> |
168 | 163 | </xpath> | 171 | </xpath> |
169 | 172 | |||
170 | 164 | <xpath expr="//button[@string='Refund Invoice']" position="after"> | 173 | <xpath expr="//button[@string='Refund Invoice']" position="after"> |
171 | 165 | <button name="%(action_account_invoice_debit)d" | 174 | <button name="%(action_account_invoice_debit)d" |
172 | 166 | type='action' | 175 | type='action' |
173 | 167 | 176 | ||
174 | === modified file 'l10n_ve_fiscal_requirements/view/res_company_view.xml' | |||
175 | --- l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-01-08 14:55:04 +0000 | |||
176 | +++ l10n_ve_fiscal_requirements/view/res_company_view.xml 2013-04-25 15:51:30 +0000 | |||
177 | @@ -9,6 +9,10 @@ | |||
178 | 9 | <field name="inherit_id" ref="base.view_company_form"/> | 9 | <field name="inherit_id" ref="base.view_company_form"/> |
179 | 10 | <field name="arch" type="xml"> | 10 | <field name="arch" type="xml"> |
180 | 11 | 11 | ||
181 | 12 | <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="inside"> | ||
182 | 13 | <field name="printer_fiscal"/> | ||
183 | 14 | </xpath> | ||
184 | 15 | |||
185 | 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"> |
186 | 13 | <separator string="Data used by default for invoices damaged" colspan="4"/> | 17 | <separator string="Data used by default for invoices damaged" colspan="4"/> |
187 | 14 | </xpath> | 18 | </xpath> |
188 | @@ -17,7 +21,6 @@ | |||
189 | 17 | 21 | ||
190 | 18 | <field name="jour_id"/> | 22 | <field name="jour_id"/> |
191 | 19 | 23 | ||
192 | 20 | <field name="acc_id"/> | ||
193 | 21 | <newline/> | 24 | <newline/> |
194 | 22 | 25 | ||
195 | 23 | <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/> | 26 | <field name="acc_id" domain="[('type','in',('other','receivable','payable'))]"/> |
196 | 24 | 27 | ||
197 | === modified file 'l10n_ve_withholding/model/l10n_ve_withholding.py' | |||
198 | --- l10n_ve_withholding/model/l10n_ve_withholding.py 2013-03-20 21:00:03 +0000 | |||
199 | +++ l10n_ve_withholding/model/l10n_ve_withholding.py 2013-04-25 15:51:30 +0000 | |||
200 | @@ -27,7 +27,7 @@ | |||
201 | 27 | 27 | ||
202 | 28 | 28 | ||
203 | 29 | class account_wh_doc(osv.osv): | 29 | class account_wh_doc(osv.osv): |
205 | 30 | _description = 'With holding document' | 30 | _description = 'Withholding document' |
206 | 31 | _name = 'account.wh.doc' | 31 | _name = 'account.wh.doc' |
207 | 32 | _columns = { | 32 | _columns = { |
208 | 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"), |
209 | 34 | 34 | ||
210 | === modified file 'l10n_ve_withholding_iva/model/generate_txt.py' | |||
211 | --- l10n_ve_withholding_iva/model/generate_txt.py 2013-03-21 15:58:01 +0000 | |||
212 | +++ l10n_ve_withholding_iva/model/generate_txt.py 2013-04-25 15:51:30 +0000 | |||
213 | @@ -75,7 +75,6 @@ | |||
214 | 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"), |
215 | 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"), |
216 | 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"), |
217 | 78 | 'type':fields.boolean('Retención Proveedores?',required=True,states={'draft':[('readonly',False)]}, help="Select the type of retention to make"), | ||
218 | 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'), |
219 | 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"), |
220 | 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"), |
221 | 82 | 81 | ||
222 | === modified file 'l10n_ve_withholding_iva/report/__init__.py' | |||
223 | --- l10n_ve_withholding_iva/report/__init__.py 2011-10-28 17:13:52 +0000 | |||
224 | +++ l10n_ve_withholding_iva/report/__init__.py 2013-04-25 15:51:30 +0000 | |||
225 | @@ -26,4 +26,4 @@ | |||
226 | 26 | ############################################################################## | 26 | ############################################################################## |
227 | 27 | 27 | ||
228 | 28 | import list_wh_iva | 28 | import list_wh_iva |
230 | 29 | import wittholding_vat | 29 | import withholding_vat |
231 | 30 | 30 | ||
232 | === renamed file 'l10n_ve_withholding_iva/report/wittholding_vat.py' => 'l10n_ve_withholding_iva/report/withholding_vat.py' | |||
233 | === modified file 'l10n_ve_withholding_src/model/partner.py' | |||
234 | --- l10n_ve_withholding_src/model/partner.py 2013-04-16 20:27:37 +0000 | |||
235 | +++ l10n_ve_withholding_src/model/partner.py 2013-04-25 15:51:30 +0000 | |||
236 | @@ -31,7 +31,6 @@ | |||
237 | 31 | 31 | ||
238 | 32 | class res_partner(osv.osv): | 32 | class res_partner(osv.osv): |
239 | 33 | _inherit = 'res.partner' | 33 | _inherit = 'res.partner' |
240 | 34 | logger = netsvc.Logger() | ||
241 | 35 | _columns = { | 34 | _columns = { |
242 | 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"), |
243 | 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"), |
localization improvements, bug fixes