下发时修改需求计划的总预计加工时间

This commit is contained in:
guanhuan
2025-06-13 15:40:02 +08:00
parent ffad4b7995
commit e145e8a3a4
4 changed files with 6 additions and 39 deletions

View File

@@ -42,6 +42,12 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
res = {'status': -2, 'message': '查询到待工艺确认的制造订单'}
return json.JSONEncoder().encode(res)
if productions:
# 修改需求计划中的程序工时
demand_plan = request.env['sf.production.demand.plan'].with_user(
request.env.ref("base.user_admin")).search([('model_id', '=', ret['folder_name'])])
if demand_plan and ret['total_estimated_time']:
demand_plan.write(
{'processing_time': ret['total_estimated_time']})
# 拉取所有加工面的程序文件
for r in ret['processing_panel'].split(','):