From 86771472fdbfc8db5dc798f768b807da9d440c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Voet=20=28ryv=29?= Date: Thu, 30 Jan 2020 15:45:46 +0000 Subject: [PATCH] [FIX] stock: fix move line without state When the "Show Detailed Operations" is enabled on a picking type, create a immediate transfers with it, validate, unlock and readd a new detailed operation, save and it will create a move line without any state. Due this lack of state, the quant won't be updated. Fix by remove the readonly=False in the state fields (3f4f77fd9d5c79c21665fa08d703bba7571decd8), to avoid sending state:False by the web client. closes odoo/odoo#44425 X-original-commit: 8f28b302e6311322abc749daf364d4c1c5398fe6 Signed-off-by: Simon Lejeune (sle) --- addons/stock/models/stock_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index 3da221d5777..adf550b3bfa 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -56,7 +56,7 @@ class StockMoveLine(models.Model): picking_code = fields.Selection(related='picking_id.picking_type_id.code', readonly=True) picking_type_use_create_lots = fields.Boolean(related='picking_id.picking_type_id.use_create_lots', readonly=True) picking_type_use_existing_lots = fields.Boolean(related='picking_id.picking_type_id.use_existing_lots', readonly=True) - state = fields.Selection(related='move_id.state', store=True, related_sudo=False, readonly=False) + state = fields.Selection(related='move_id.state', store=True, related_sudo=False) is_initial_demand_editable = fields.Boolean(related='move_id.is_initial_demand_editable', readonly=False) is_locked = fields.Boolean(related='move_id.is_locked', default=True, readonly=True) consume_line_ids = fields.Many2many('stock.move.line', 'stock_move_line_consume_rel', 'consume_line_id', 'produce_line_id', help="Technical link to see who consumed what. ")