[FIX] account: use float_compare instead of just <>
This commit is contained in:
parent
bc38c36503
commit
dafa7958c6
|
@ -23,6 +23,7 @@
|
|||
import time
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools import float_compare
|
||||
from openerp.tools.translate import _
|
||||
import openerp.addons.decimal_precision as dp
|
||||
|
||||
|
@ -80,7 +81,8 @@ class account_cash_statement(osv.osv):
|
|||
if (statement.journal_id.type not in ('cash',)):
|
||||
continue
|
||||
if not statement.journal_id.cash_control:
|
||||
if statement.balance_end_real <> statement.balance_end:
|
||||
prec = self.pool['decimal.precision'].precision_get(cr, uid, 'Account')
|
||||
if float_compare(statement.balance_end_real, statement.balance_end, precision_digits=prec):
|
||||
statement.write({'balance_end_real' : statement.balance_end})
|
||||
continue
|
||||
start = end = 0
|
||||
|
|
Loading…
Reference in New Issue