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
=== modified file 'l10n_ve_withholding_iva/model/invoice.py'
--- l10n_ve_withholding_iva/model/invoice.py 2013-06-10 18:36:25 +0000
+++ l10n_ve_withholding_iva/model/invoice.py 2013-06-11 18:54:30 +0000
@@ -106,7 +106,6 @@
106 'account.move.line': (_get_inv_from_line, None, 50),106 'account.move.line': (_get_inv_from_line, None, 50),
107 'account.move.reconcile': (_get_inv_from_reconcile, None, 50),107 'account.move.reconcile': (_get_inv_from_reconcile, None, 50),
108 }, help="The account moves of the invoice have been retention with account moves of the payment(s)."), 108 }, help="The account moves of the invoice have been retention with account moves of the payment(s)."),
109 'wh_iva_rate': fields.float('Wh rate', digits_compute= dp.get_precision('Withhold'), readonly=True, states={'draft':[('readonly',False)]}, help="Vat Withholding rate"),
110 'wh_iva_id': fields.function(_fnct_get_wh_iva_id, method=True,109 'wh_iva_id': fields.function(_fnct_get_wh_iva_id, method=True,
111 type='many2one', relation='account.wh.iva', 110 type='many2one', relation='account.wh.iva',
112 string='VAT Wh. Document', 111 string='VAT Wh. Document',
@@ -469,7 +468,10 @@
469 for ait in inv.tax_line:468 for ait in inv.tax_line:
470 amount_ret = 0.0469 amount_ret = 0.0
471 if ait.tax_id.ret:470 if ait.tax_id.ret:
472 amount_ret = inv.wh_iva_rate and ait.tax_amount*inv.wh_iva_rate/100.0 or 0.00471 wh_iva_rate = inv.type in ['out_invoice', "out_reunf"] \
472 and inv.company_id.partner_id.wh_iva_rate \
473 or inv.partner_id.wh_iva_rate
474 amount_ret = wh_iva_rate and ait.tax_amount*wh_iva_rate/100.0 or 0.00
473 res[ait.id] = {'amount_ret': amount_ret, 'base_ret': ait.base_amount}475 res[ait.id] = {'amount_ret': amount_ret, 'base_ret': ait.base_amount}
474 return res476 return res
475477
476478
=== modified file 'l10n_ve_withholding_iva/view/account_invoice_view.xml'
--- l10n_ve_withholding_iva/view/account_invoice_view.xml 2013-05-23 04:34:03 +0000
+++ l10n_ve_withholding_iva/view/account_invoice_view.xml 2013-06-11 18:54:30 +0000
@@ -19,7 +19,6 @@
19 <newline/>19 <newline/>
20 <group col="6" colspan="4">20 <group col="6" colspan="4">
21 <field name="wh_iva"/>21 <field name="wh_iva"/>
22 <field name="wh_iva_rate"/>
23 <field name="wh_iva_id"/>22 <field name="wh_iva_id"/>
24 </group>23 </group>
25 </xpath>24 </xpath>
@@ -40,7 +39,6 @@
40 <newline/>39 <newline/>
41 <group col="4" colspan="4">40 <group col="4" colspan="4">
42 <field name="wh_iva" string="Have this invoice been already VAT withheld?"/>41 <field name="wh_iva" string="Have this invoice been already VAT withheld?"/>
43 <field name="wh_iva_rate"/>
44 <field name="wh_iva_id" string="VAT Withholding Document"/>42 <field name="wh_iva_id" string="VAT Withholding Document"/>
45 <newline/>43 <newline/>
46 <field name="vat_apply" string="Exclude this document from VAT Withholding" readonly="1"/>44 <field name="vat_apply" string="Exclude this document from VAT Withholding" readonly="1"/>