[FIX] mrp: bypass flexible consumption check in immediate production
Case: - create a MO for 3 units - produce only one but with more than a third of the components - the flexible consumption wizard is triggered, accept and make the backorder. - Mark as done the backorder, the immediate production wizard is triggered, accept it. -> the flexible wizard is triggered again as the components quantity do not respect the BoM. In this specific case, we want to consume all the remaining component so we would like to avoid the flexible warning. Task : 2278147
This commit is contained in:
@@ -1205,7 +1205,7 @@ class MrpProduction(models.Model):
|
||||
:rtype: list
|
||||
"""
|
||||
issues = []
|
||||
if self.env.context.get('skip_consumption', False):
|
||||
if self.env.context.get('skip_consumption', False) or self.env.context.get('skip_immediate', False):
|
||||
return issues
|
||||
for order in self:
|
||||
if order.consumption == 'flexible' or not order.bom_id or not order.bom_id.bom_line_ids:
|
||||
|
||||
Reference in New Issue
Block a user