Skip to content

Commit

Permalink
[IMP] sale_stock_mto_as_mts_orderpoint
Browse files Browse the repository at this point in the history
Return the orderpoint ids that have been run on the sale confirmation.
  • Loading branch information
TDu committed Sep 6, 2024
1 parent 55e4255 commit 8ce633b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sale_stock_mto_as_mts_orderpoint/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _run_orderpoints_for_mto_products(self):
orderpoints_to_procure_ids = []
mto_route = self.env.ref("stock.route_warehouse0_mto", raise_if_not_found=False)
if not mto_route:
return
return orderpoints_to_procure_ids

Check warning on line 21 in sale_stock_mto_as_mts_orderpoint/models/sale_order.py

View check run for this annotation

Codecov / codecov/patch

sale_stock_mto_as_mts_orderpoint/models/sale_order.py#L21

Added line #L21 was not covered by tests
for line in self:
delivery_moves = line.move_ids.filtered(
lambda m: m.picking_id.picking_type_code == "outgoing"
Expand All @@ -44,6 +44,7 @@ def _run_orderpoints_for_mto_products(self):
.create({})
)
wiz.make_procurement()
return orderpoints_to_procure_ids

def _get_mto_orderpoint(self, product_id):
self.ensure_one()
Expand Down

0 comments on commit 8ce633b

Please sign in to comment.