1、制造订单状态优化
This commit is contained in:
@@ -364,9 +364,8 @@ class MrpProduction(models.Model):
|
|||||||
# 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'
|
||||||
if any((wo.test_results == '返工' and wo.state == 'done' and production.programming_state in ['已编程'])
|
if any((wo.test_results == '返工' and wo.state == 'done' and production.programming_state in ['已编程'])
|
||||||
or (wo.state == 'rework' and production.programming_state == '编程中')
|
|
||||||
or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程'])
|
or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程'])
|
||||||
for wo in production.workorder_ids) and production.state not in ['progress']:
|
for wo in production.workorder_ids):
|
||||||
production.state = 'rework'
|
production.state = 'rework'
|
||||||
if any(wo.test_results == '报废' and wo.state == 'done' for wo in production.workorder_ids):
|
if any(wo.test_results == '报废' and wo.state == 'done' for wo in production.workorder_ids):
|
||||||
production.state = 'scrap'
|
production.state = 'scrap'
|
||||||
|
|||||||
Reference in New Issue
Block a user