[FIX] account: amount in secondary currency shouldn't be recomputed if 0 is given...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 8 Jan 2014 16:04:44 +0000 (17:04 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 8 Jan 2014 16:04:44 +0000 (17:04 +0100)
bzr revid: qdp-launchpad@openerp.com-20140108160444-v2noeye7ftl32jgi

addons/account/account_move_line.py

index 69a62c9..3e40840 100644 (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: