Skip to content

Commit

Permalink
Merge PR #1393 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Nov 12, 2024
2 parents e2204d5 + 323b3fe commit edc0b83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mrp_multi_level/models/product_mrp_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,7 @@ def _to_be_exploded(self):
def _get_locations(self):
self.ensure_one()
return self.mrp_area_id._get_locations()

def _should_create_planned_order(self):
self.ensure_one()
return True
4 changes: 3 additions & 1 deletion mrp_multi_level/wizards/mrp_multi_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ def create_planned_order(
order_data = self._prepare_planned_order_data(
product_mrp_area_id, qty, mrp_date_supply, mrp_action_date, name, values
)
planned_order = self.env["mrp.planned.order"].create(order_data)
planned_order = False
if product_mrp_area_id._should_create_planned_order():
planned_order = self.env["mrp.planned.order"].create(order_data)
qty_ordered = qty_ordered + qty

if product_mrp_area_id._to_be_exploded():
Expand Down

0 comments on commit edc0b83

Please sign in to comment.