From ba392d143b96b14da5fcda352b61e03133d5d089 Mon Sep 17 00:00:00 2001 From: Joel Grand-Guillaume Date: Wed, 4 Nov 2009 07:52:26 +0100 Subject: [PATCH] [FIX] Correct the validate function for balanced move into account.py (after Fabien Warning) lp bug: https://launchpad.net/bugs/452854 fixed bzr revid: joel.grandguillaume@camptocamp.com-20091104065226-sax4u9d6ss4oif62 --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3ed4ebc600c..eb7771d8197 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -988,7 +988,7 @@ class account_move(osv.osv): if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id): raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name))) - if abs(amount) < config['price_accuracy']: + if abs(amount) < 10**-config['price_accuracy']: if not len(line_draft_ids): continue self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {