[FIX] mrp: always no manual consumption when use_auto_consume_components_lots
When use_auto_consume_components_lots is on, it's always no manual consumption on a MO even when the product is no tracked. Fix it Part-of: odoo/odoo#113538
This commit is contained in:
@@ -149,7 +149,8 @@ class StockMove(models.Model):
|
||||
for move in self:
|
||||
if move.state != 'draft':
|
||||
continue
|
||||
move.manual_consumption = not move.raw_material_production_id.use_auto_consume_components_lots and (move.bom_line_id.manual_consumption or move.has_tracking != 'none')
|
||||
move.manual_consumption = (move.has_tracking != 'none' and not move.raw_material_production_id.use_auto_consume_components_lots) or \
|
||||
(move.has_tracking == 'none' and move.bom_line_id.manual_consumption)
|
||||
|
||||
@api.depends('bom_line_id')
|
||||
def _compute_description_bom_line(self):
|
||||
|
||||
Reference in New Issue
Block a user