[FIX] account_voucher: post accounting entry related to a currency rate difference in all cases
bzr revid: qdp-launchpad@openerp.com-20130507130520-3zndk5mt7mlvv3i7
This commit is contained in:
parent
976b8f6d33
commit
65713a5dc9
|
@ -1226,7 +1226,7 @@ class account_voucher(osv.osv):
|
|||
# if the rate is specified on the voucher, it will be used thanks to the special keys in the context
|
||||
# otherwise we use the rates of the system
|
||||
amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
|
||||
if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:
|
||||
if line.amount == line.amount_unreconciled:
|
||||
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
|
||||
|
||||
|
|
Loading…
Reference in New Issue