From 945099dc6762322558d06c418c0ead60e70d305c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 Jul 2026 16:38:57 +0200 Subject: [PATCH] Set danger visual on supplier invoice when amount to pay is greater than 0 The amount to pay is always positive so the test must be "greater than 0". Closes #14925 (grafted from e4e920cb9e7d2a2f3bfa86fad4e8c3025cb78828) --HG-- branch : 8.0 --- modules/account_invoice/invoice.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/account_invoice/invoice.py b/modules/account_invoice/invoice.py index c2c8a9894a..0ed2479a7d 100644 --- a/modules/account_invoice/invoice.py +++ b/modules/account_invoice/invoice.py @@ -1603,11 +1603,7 @@ class Invoice( return super().view_attributes() + [ ('/form//field[@name="comment"]', 'spell', Eval('party_lang')), ('/tree', 'visual', - If(( - (Eval('type') == 'out') - & (Eval('amount_to_pay_today', 0) > 0)) - | ((Eval('type') == 'in') - & (Eval('amount_to_pay_today', 0) < 0)), + If(Eval('amount_to_pay_today', 0) > 0, 'danger', If(Eval('state') == 'cancelled', 'muted', ''))), ] + payment_means