From c17618d0d8656cb8f68a20427e4044ea055feb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 21 Sep 2026 10:04:34 +0200 Subject: [PATCH] Make landed cost field on account invoice line not editable instead of readonly Users must be allowed to edit it when adding invoice lines to a landed cost. --- modules/account_stock_landed_cost/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/account_stock_landed_cost/account.py b/modules/account_stock_landed_cost/account.py index 99df0ecb09..151d68c70b 100644 --- a/modules/account_stock_landed_cost/account.py +++ b/modules/account_stock_landed_cost/account.py @@ -546,8 +546,9 @@ class LandedCostShowMove(ModelView): class InvoiceLine(metaclass=PoolMeta): __name__ = 'account.invoice.line' landed_cost = fields.Many2One( - 'account.landed_cost', "Landed Cost", readonly=True, + 'account.landed_cost', "Landed Cost", states={ + 'editable': False, 'invisible': ~Eval('landed_cost'), })