From 8a8780b8108356c86678823d32dec244c1d873f3 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 14 Feb 2019 17:43:48 +0100 Subject: [PATCH] account_usability: fix onchange on amount_currency: invert debit and credit --- account_usability/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_usability/account.py b/account_usability/account.py index 8f46082..2bf33d0 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -418,9 +418,9 @@ class AccountMoveLine(models.Model): if float_compare( amount_company_currency, 0, precision_digits=precision) == -1: - self.debit = amount_company_currency * -1 + self.credit = amount_company_currency * -1 else: - self.credit = amount_company_currency + self.debit = amount_company_currency def show_account_move_form(self): self.ensure_one()