[FIX] account: use float_compare instead of just <>
This commit is contained in:
parent
bc38c36503
commit
dafa7958c6
|
@ -23,6 +23,7 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
|
from openerp.tools import float_compare
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
import openerp.addons.decimal_precision as dp
|
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',)):
|
if (statement.journal_id.type not in ('cash',)):
|
||||||
continue
|
continue
|
||||||
if not statement.journal_id.cash_control:
|
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})
|
statement.write({'balance_end_real' : statement.balance_end})
|
||||||
continue
|
continue
|
||||||
start = end = 0
|
start = end = 0
|
||||||
|
|
Loading…
Reference in New Issue