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.
This commit is contained in:
Cédric Krier
2026-09-21 10:04:34 +02:00
parent bdefd24bbc
commit c17618d0d8
+2 -1
View File
@@ -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'),
})