Merge lp:~vauxoo/openerp-venezuela-localization/ovl70-whiva-delete-invoice-field into lp:openerp-venezuela-localization

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 874
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/ovl70-whiva-delete-invoice-field
Merge into: lp:openerp-venezuela-localization
Diff against target: 43 lines (+4/-4)
2 files modified
l10n_ve_withholding_iva/model/invoice.py (+4/-2)
l10n_ve_withholding_iva/view/account_invoice_view.xml (+0/-2)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-whiva-delete-invoice-field
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Approve
Review via email: mp+168790@code.launchpad.net

Commit message

[IMP] delete useless 'wh_iva_rate' field in invoice model (at iva module).

To post a comment you must log in.
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_withholding_iva/model/invoice.py'
2--- l10n_ve_withholding_iva/model/invoice.py 2013-06-10 18:36:25 +0000
3+++ l10n_ve_withholding_iva/model/invoice.py 2013-06-11 18:54:30 +0000
4@@ -106,7 +106,6 @@
5 'account.move.line': (_get_inv_from_line, None, 50),
6 'account.move.reconcile': (_get_inv_from_reconcile, None, 50),
7 }, help="The account moves of the invoice have been retention with account moves of the payment(s)."),
8- 'wh_iva_rate': fields.float('Wh rate', digits_compute= dp.get_precision('Withhold'), readonly=True, states={'draft':[('readonly',False)]}, help="Vat Withholding rate"),
9 'wh_iva_id': fields.function(_fnct_get_wh_iva_id, method=True,
10 type='many2one', relation='account.wh.iva',
11 string='VAT Wh. Document',
12@@ -469,7 +468,10 @@
13 for ait in inv.tax_line:
14 amount_ret = 0.0
15 if ait.tax_id.ret:
16- amount_ret = inv.wh_iva_rate and ait.tax_amount*inv.wh_iva_rate/100.0 or 0.00
17+ wh_iva_rate = inv.type in ['out_invoice', "out_reunf"] \
18+ and inv.company_id.partner_id.wh_iva_rate \
19+ or inv.partner_id.wh_iva_rate
20+ amount_ret = wh_iva_rate and ait.tax_amount*wh_iva_rate/100.0 or 0.00
21 res[ait.id] = {'amount_ret': amount_ret, 'base_ret': ait.base_amount}
22 return res
23
24
25=== modified file 'l10n_ve_withholding_iva/view/account_invoice_view.xml'
26--- l10n_ve_withholding_iva/view/account_invoice_view.xml 2013-05-23 04:34:03 +0000
27+++ l10n_ve_withholding_iva/view/account_invoice_view.xml 2013-06-11 18:54:30 +0000
28@@ -19,7 +19,6 @@
29 <newline/>
30 <group col="6" colspan="4">
31 <field name="wh_iva"/>
32- <field name="wh_iva_rate"/>
33 <field name="wh_iva_id"/>
34 </group>
35 </xpath>
36@@ -40,7 +39,6 @@
37 <newline/>
38 <group col="4" colspan="4">
39 <field name="wh_iva" string="Have this invoice been already VAT withheld?"/>
40- <field name="wh_iva_rate"/>
41 <field name="wh_iva_id" string="VAT Withholding Document"/>
42 <newline/>
43 <field name="vat_apply" string="Exclude this document from VAT Withholding" readonly="1"/>