[MERGE] merge with main addons

bzr revid: rpr@tinyerp.com-20120821053410-jkf6780gpt43qxfm
This commit is contained in:
Rajesh Prajapati (OpenERP)
2012-08-21 11:04:10 +05:30
+2 -1
View File
@@ -1106,7 +1106,8 @@ class account_voucher(osv.osv):
# otherwise we use the rates of the system (giving the voucher date in the context)
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:
foreign_currency_diff = line.move_line_id.amount_residual_currency + amount_currency
sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
move_line['amount_currency'] = amount_currency
voucher_line = move_line_obj.create(cr, uid, move_line)