1、当检测到缺刀工单需要的功能刀具从刀具房出库到线边刀架时,更改cnc编程单的功能刀具状态为正常;
This commit is contained in:
@@ -32,9 +32,9 @@ class MrpProduction(models.Model):
|
||||
def _compute_tool_state(self):
|
||||
for item in self:
|
||||
if item:
|
||||
if item.workorder_ids.filtered(lambda a: a.tool_state == '2'):
|
||||
if item.workorder_ids.filtered(lambda a: a.tool_state == '2' and a.state not in ('rework', '返工')):
|
||||
item.tool_state = '2'
|
||||
elif item.workorder_ids.filtered(lambda a: a.tool_state == '1'):
|
||||
elif item.workorder_ids.filtered(lambda a: a.tool_state == '1' and a.state not in ('rework', '返工')):
|
||||
item.tool_state = '1'
|
||||
else:
|
||||
item.tool_state = '0'
|
||||
|
||||
Reference in New Issue
Block a user