[FIX] account: amount in secondary currency shouldn't be recomputed if 0 is given as value

bzr revid: qdp-launchpad@openerp.com-20140108160444-v2noeye7ftl32jgi
This commit is contained in:
Quentin (OpenERP) 2014-01-08 17:04:44 +01:00
parent 7f8b6542f0
commit 81ac1302f6
1 changed files with 1 additions and 1 deletions

View File

@ -1202,7 +1202,7 @@ class account_move_line(osv.osv):
break
# Automatically convert in the account's secondary currency if there is one and
# the provided values were not already multi-currency
if account.currency_id and (vals.get('amount_currency', False) is False) and account.currency_id.id != account.company_id.currency_id.id:
if account.currency_id and 'amount_currency' not in vals and account.currency_id.id != account.company_id.currency_id.id:
vals['currency_id'] = account.currency_id.id
ctx = {}
if 'date' in vals: