details:   https://code.tryton.org/tryton/commit/81a1af4eb594
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Sep 21 10:04:34 2026 +0200
description:
        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.
diffstat:

 modules/account_stock_landed_cost/account.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r e92eb501cc50 -r 81a1af4eb594 
modules/account_stock_landed_cost/account.py
--- a/modules/account_stock_landed_cost/account.py      Wed Sep 09 12:22:52 
2026 +0200
+++ b/modules/account_stock_landed_cost/account.py      Mon Sep 21 10:04:34 
2026 +0200
@@ -546,8 +546,9 @@
 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'),
             })
 

Reply via email to