人工线下加工表面工艺逻辑还原

This commit is contained in:
liaodanlong
2025-02-27 15:09:14 +08:00
parent 20932f9d51
commit 3bcc673d88

View File

@@ -1224,7 +1224,7 @@ class ResMrpWorkOrder(models.Model):
if (workorder.production_id.production_type == '人工线下加工' if (workorder.production_id.production_type == '人工线下加工'
and workorder.production_id.schedule_state == '已排' and workorder.production_id.schedule_state == '已排'
and len(workorder.production_id.picking_ids.filtered( and len(workorder.production_id.picking_ids.filtered(
lambda w: w.state in ['done', 'cancel'])) >= 2): lambda w: w.state not in ['done', 'cancel'])) == 0):
# and workorder.production_id.programming_state == '已编程' # and workorder.production_id.programming_state == '已编程'
if workorder.is_subcontract is True: if workorder.is_subcontract is True:
purchase_orders_id = self._get_surface_technics_purchase_ids() purchase_orders_id = self._get_surface_technics_purchase_ids()