需求计划下达计划

This commit is contained in:
guanhuan
2025-07-07 10:46:27 +08:00
parent 9db4ea745b
commit 22ccb095ee
3 changed files with 30 additions and 2 deletions

View File

@@ -44,7 +44,8 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
if productions:
# 修改需求计划中的程序工时
demand_plan = request.env['sf.production.demand.plan'].with_user(
request.env.ref("base.user_admin")).search([('model_id', '=', ret['folder_name'])])
request.env.ref("base.user_admin")).search(
[('model_id', '=', ret['folder_name']), ('new_supply_method', '=', 'custom_made')])
if demand_plan and ret['total_estimated_time']:
demand_plan.write(
{'processing_time': ret['total_estimated_time']})