sorted_workorders变量过滤

This commit is contained in:
liaodanlong
2024-12-28 09:12:27 +08:00
parent 6780d4e758
commit abfac28094

View File

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