From 8fe4515a91c2f99acfbe60ee200e24b05b1463f8 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 18 May 2026 21:34:24 +0200 Subject: [PATCH 1/3] [IMP] account_invoice_margin: set new option 'optional' hide to margin fields on tree views. Rational: this field is usefull to be in the tree. However, it is not usefull for all user in a day to day basis. put optional='hide' to make the invoice and invoice lines list tree view lighter. --- .../views/account_invoice_margin_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/account_invoice_margin/views/account_invoice_margin_view.xml b/account_invoice_margin/views/account_invoice_margin_view.xml index d640de73d..5070c0fdb 100644 --- a/account_invoice_margin/views/account_invoice_margin_view.xml +++ b/account_invoice_margin/views/account_invoice_margin_view.xml @@ -18,12 +18,12 @@ /> @@ -65,12 +65,12 @@ From 75818f71b4665a39e849f098b27c90079f7dd519 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Tue, 7 Jul 2026 16:56:50 +0200 Subject: [PATCH 2/3] [FIX] account_invoice_margin : prevent to display useless fields on account.move.lines (when not related to out invoices) --- account_invoice_margin/views/account_invoice_margin_view.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/account_invoice_margin/views/account_invoice_margin_view.xml b/account_invoice_margin/views/account_invoice_margin_view.xml index 5070c0fdb..260ba31fd 100644 --- a/account_invoice_margin/views/account_invoice_margin_view.xml +++ b/account_invoice_margin/views/account_invoice_margin_view.xml @@ -15,16 +15,19 @@ name="purchase_price" optional="show" groups="account_invoice_margin.group_account_invoice_margin_security" + attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}" /> From 2375bf302f1f491cb47055e6fa5f843460a5bd6a Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Tue, 7 Jul 2026 16:58:35 +0200 Subject: [PATCH 3/3] [FIX] account_invoice_margin : do not display margin in move tree views, if there are not out invoices --- account_invoice_margin/views/account_invoice_margin_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_invoice_margin/views/account_invoice_margin_view.xml b/account_invoice_margin/views/account_invoice_margin_view.xml index 260ba31fd..66bc65206 100644 --- a/account_invoice_margin/views/account_invoice_margin_view.xml +++ b/account_invoice_margin/views/account_invoice_margin_view.xml @@ -62,7 +62,7 @@ account.move - +