[FIX] account_voucher: fixed error in amount_currency computation due to bad arguments sequence

bzr revid: qdp-launchpad@openerp.com-20111017095853-skdc5qi13m70kx33
This commit is contained in:
Quentin (OpenERP)
2011-10-17 11:58:53 +02:00
parent 3ee6198ef2
commit 65ea032c1e
+2 -2
View File
@@ -817,10 +817,10 @@ class account_voucher(osv.osv):
continue
#we check if the voucher line is fully paid or not and create a move line to balance the payment and initial invoice if needed
if line.amount == line.amount_unreconciled:
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context)
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context)
amount_residual = line.move_line_id.amount_residual - amount #residual amount in company currency
else:
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context)
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context)
amount_residual = 0.0
move_line = {
'journal_id': voucher_brw.journal_id.id,