diff --git a/stock.py b/stock.py index 9481cfadeb..9d26171da6 100644 --- a/stock.py +++ b/stock.py @@ -224,7 +224,10 @@ class InventoryLine: domain=[ ('product', '=', Eval('product')), ], - depends=['product']) + states={ + 'readonly': Eval('inventory_state') != 'draft', + }, + depends=['product', 'inventory_state']) @classmethod def __setup__(cls):