From 9096dda5b460426f579c04c49d00e84809bf9ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 13 Jun 2023 12:56:54 +0200 Subject: [PATCH] Do not display delegated amount if it is 0 This prevents to display the currency when there is no amount delegated. --- modules/account/move.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/account/move.py b/modules/account/move.py index 1cd2489367..aa530819c2 100644 --- a/modules/account/move.py +++ b/modules/account/move.py @@ -944,7 +944,9 @@ class Line(MoveLineMixin, ModelSQL, ModelView): "Delegated Amount", currency='amount_currency', digits='amount_currency', states={ - 'invisible': ~Eval('reconciliation', False), + 'invisible': ( + ~Eval('reconciliation', False) + | ~Eval('delegated_amount', 0)), }), 'get_delegated_amount') payable_receivable_balance = fields.Function(