base, account: fix is_zero and pay_and_reconcile test

bzr revid: ced-f7260b4b645ac1c0ba8f7d7252e0f25d95ff7e95
This commit is contained in:
ced 2007-07-31 14:09:06 +00:00
parent 554965b74e
commit e0f65b2596
1 changed files with 2 additions and 1 deletions

View File

@ -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: