Accept Merge Request #1888: (feature/tool_standard_library_process -> develop)

Merge Request: 制造订单状态为返工时限制表面工艺工单状态

Created By: @廖丹龙
Reviewed By: @胡尧
Approved By: @胡尧 
Accepted By: @廖丹龙
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1888
This commit is contained in:
廖丹龙
2025-02-28 16:38:23 +08:00
committed by Coding

View File

@@ -1228,6 +1228,9 @@ class ResMrpWorkOrder(models.Model):
lambda w: w.state not in ['done', 'cancel'])) == 0):
# and workorder.production_id.programming_state == '已编程'
if workorder.is_subcontract is True:
if workorder.production_id.state == 'rework':
workorder.state = 'waiting'
continue
purchase_orders_id = self._get_surface_technics_purchase_ids()
if purchase_orders_id.state == 'purchase':
workorder.state = 'ready'