[FIX] account: fixed computation of reconciled fields on account.move.line and account.invoice which were wrong due to bad usage of float_is_zero()

This commit is contained in:
qdp-odoo
2016-01-28 10:58:38 +01:00
parent 3fab3a1347
commit d35e75f7eb
3 changed files with 3 additions and 3 deletions
@@ -81,7 +81,7 @@ class AccountBankStatement(models.Model):
@api.multi
def _is_difference_zero(self):
for bank_stmt in self:
bank_stmt.is_difference_zero = float_is_zero(bank_stmt.difference, bank_stmt.currency_id.decimal_places)
bank_stmt.is_difference_zero = float_is_zero(bank_stmt.difference, precision_digits=bank_stmt.currency_id.decimal_places)
@api.one
@api.depends('journal_id')
+1 -1
View File
@@ -97,7 +97,7 @@ class AccountInvoice(models.Model):
self.residual_signed = abs(residual) * sign
self.residual = abs(residual)
digits_rounding_precision = self.currency_id.rounding
if float_is_zero(self.residual, digits_rounding_precision):
if float_is_zero(self.residual, precision_rounding=digits_rounding_precision):
self.reconciled = True
else:
self.reconciled = False
+1 -1
View File
@@ -254,7 +254,7 @@ class AccountMoveLine(models.Model):
#we can only check the amount in company currency
reconciled = False
digits_rounding_precision = line.company_id.currency_id.rounding
if float_is_zero(amount, digits_rounding_precision) and (line.debit or line.credit):
if float_is_zero(amount, precision_rounding=digits_rounding_precision) and (line.debit or line.credit):
reconciled = True
line.reconciled = reconciled