Merge PR #547 into 11.0

Signed-off-by LoisRForgeFlow
This commit is contained in:
OCA-git-bot
2020-11-02 16:01:46 +00:00
2 changed files with 9 additions and 1 deletions

View File

@@ -196,3 +196,11 @@ class ProductMRPArea(models.Model):
self.mrp_maximum_order_qty:
return self.mrp_maximum_order_qty
return qty_to_order
@api.multi
def _to_be_exploded(self):
self.ensure_one()
if self.supply_method == 'manufacture':
return True
else:
return False

View File

@@ -273,7 +273,7 @@ class MultiLevelMrp(models.TransientModel):
planned_order = self.env['mrp.planned.order'].create(order_data)
qty_ordered = qty_ordered + qty
if product_mrp_area_id.supply_method == 'manufacture':
if product_mrp_area_id._to_be_exploded():
self.explode_action(
product_mrp_area_id, mrp_action_date,
name, qty, planned_order)