制造订单状态优化
This commit is contained in:
@@ -331,6 +331,9 @@ class MrpProduction(models.Model):
|
|||||||
production.state = 'pending_cam'
|
production.state = 'pending_cam'
|
||||||
if production.is_rework is True:
|
if production.is_rework is True:
|
||||||
production.state = 'rework'
|
production.state = 'rework'
|
||||||
|
if (production.state == 'rework' and production.tool_state == '0'
|
||||||
|
and production.schedule_state == '已排' and production.is_rework is False):
|
||||||
|
production.state = 'pending_cam'
|
||||||
# if production.state == 'pending_cam':
|
# if production.state == 'pending_cam':
|
||||||
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):
|
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):
|
||||||
# production.state = 'done'
|
# production.state = 'done'
|
||||||
@@ -353,6 +356,7 @@ class MrpProduction(models.Model):
|
|||||||
if production.tool_state == '2':
|
if production.tool_state == '2':
|
||||||
production.state = 'rework'
|
production.state = 'rework'
|
||||||
|
|
||||||
|
|
||||||
# 退回调整
|
# 退回调整
|
||||||
def technology_back_adjust(self):
|
def technology_back_adjust(self):
|
||||||
process_parameters = []
|
process_parameters = []
|
||||||
|
|||||||
Reference in New Issue
Block a user