From e0f65b2596da191393a98a57bfc1b431985b8f20 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 31 Jul 2007 14:09:06 +0000 Subject: [PATCH] base, account: fix is_zero and pay_and_reconcile test bzr revid: ced-f7260b4b645ac1c0ba8f7d7252e0f25d95ff7e95 --- addons/account/account_move_line.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 96e24f0e251..5901b4ce8b4 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -298,7 +298,8 @@ class account_move_line(osv.osv): raise osv.except_osv('Error', 'The account is not defined to be reconcile !') if r[0][1] != None: raise Exception('Some entries are already reconciled !') - if self.pool.get('res.currency').is_zero(cr, uid, account.company_id.currency_id, writeoff): + if not self.pool.get('res.currency').is_zero(cr, uid, + account.company_id.currency_id, writeoff): if not writeoff_acc_id: raise osv.except_osv('Warning', 'You have to provide an account for the write off entry !') if writeoff > 0: