From 6b3d2263c764ff171d9af0a98f76ce2091989f70 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 14 Feb 2019 17:31:17 +0100 Subject: [PATCH] account_usability: Improve onchange for amount_currency --- account_usability/account.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/account_usability/account.py b/account_usability/account.py index 3f3eff4..8f46082 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -409,9 +409,7 @@ class AccountMoveLine(models.Model): prec = self.env['decimal.precision'].precision_get('Account') if ( self.currency_id and - self.amount_currency and - float_is_zero(self.credit, precision_digits=prec) and - float_is_zero(self.debit, precision_digits=prec)): + not float_is_zero(self.amount_currency, precision_digits=prec)): date = self.date or None amount_company_currency = self.currency_id.with_context( date=date).compute(