Accept Merge Request #1562: (feature/sale_order_route_pick -> develop)

Merge Request: 解决工单完成的问题

Created By: @胡尧
Accepted By: @胡尧
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1562?initial=true
This commit is contained in:
胡尧
2024-11-27 17:40:58 +08:00
committed by Coding
2 changed files with 3 additions and 7 deletions

View File

@@ -320,11 +320,7 @@ class MrpProduction(models.Model):
elif production.state == 'pending_cam' and production.schedule_state == '未排':
production.state = 'confirmed'
elif production.state == 'to_close' and production.schedule_state == '已排':
if all(
wo_state in ('done', 'cancel') for wo_state in production.workorder_ids.mapped('state')):
production.state = 'done'
else:
production.state = 'pending_cam'
production.state = 'pending_cam'
elif production.state == 'confirmed' and production.is_adjust is True:
production.state = 'technology_to_confirmed'
if production.state == 'confirmed' and production.schedule_state == '已排':