Merge lp:~vauxoo/addons-vauxoo/7.0-amount_debit_credit_tax_inv_refounds-dev_luis into lp:addons-vauxoo/7.0

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 982
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-amount_debit_credit_tax_inv_refounds-dev_luis
Merge into: lp:addons-vauxoo/7.0
Diff against target: 22 lines (+4/-1)
1 file modified
account_voucher_tax/account_voucher.py (+4/-1)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-amount_debit_credit_tax_inv_refounds-dev_luis
Reviewer Review Type Date Requested Status
Julio Serna-http://www.vauxoo.com Pending
Review via email: mp+204133@code.launchpad.net

Description of the change

Se agrego validacion que cuando el pago sea de una nota de credito invierta los montos en el debit y credit de los impuestos

To post a comment you must log in.
961. By Luis Torres - http://www.vauxoo.com

[IMP][account_voucher_tax]Change parameter of function by param in context

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_voucher_tax/account_voucher.py'
--- account_voucher_tax/account_voucher.py 2013-11-14 20:26:01 +0000
+++ account_voucher_tax/account_voucher.py 2014-02-11 21:18:31 +0000
@@ -100,6 +100,7 @@
100 current_currency = self._get_current_currency(cr, uid, voucher_id, context)100 current_currency = self._get_current_currency(cr, uid, voucher_id, context)
101 move_ids=[]101 move_ids=[]
102 for voucher in self.browse(cr, uid, [voucher_id], context=context):102 for voucher in self.browse(cr, uid, [voucher_id], context=context):
103 context.update({'amount_voucher': voucher.amount or 0.0})
103 for line in voucher.line_ids:104 for line in voucher.line_ids:
104 if line.tax_line_ids:105 if line.tax_line_ids:
105 if line.amount > line.amount_original:106 if line.amount > line.amount_original:
@@ -361,7 +362,9 @@
361 'date' : date,362 'date' : date,
362 'tax_voucher_id' : tax_id,363 'tax_voucher_id' : tax_id,
363 }364 }
364365 if context.get('amount_voucher') and context.get('amount_voucher') < 0:
366 debit_line_vals.update({'credit': debit_line_vals.get('debit', 0.0), 'debit': 0.0})
367 credit_line_vals.update({'debit': credit_line_vals.get('credit', 0.0), 'credit': 0.0})
365 if type in ('payment','purchase'):368 if type in ('payment','purchase'):
366 reference_amount < 0 and\369 reference_amount < 0 and\
367 [credit_line_vals.pop('analytic_account_id'),370 [credit_line_vals.pop('analytic_account_id'),