Accept Merge Request #1657: (feature/part_number -> develop)

Merge Request: sorted_workorders变量过滤

Created By: @廖丹龙
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @廖丹龙
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1657
This commit is contained in:
廖丹龙
2024-12-28 09:13:42 +08:00
committed by Coding

View File

@@ -842,6 +842,8 @@ class MrpProduction(models.Model):
# self.env['stock.picking'].create_outcontract_picking(consecutive_workorders, production)
# self.env['purchase.order'].get_purchase_order(consecutive_workorders, production,
# product_id_to_production_names)
if not sorted_workorders:
return
for workorders in reversed(sorted_workorders):
self.env['stock.picking'].create_outcontract_picking(workorders, production, sorted_workorders)
self.env['purchase.order'].get_purchase_order(workorders, production, product_id_to_production_names)