物料需求计划管理

This commit is contained in:
guanhuan
2025-06-24 17:46:55 +08:00
parent 02b4f76326
commit f41d3558d2
8 changed files with 151 additions and 36 deletions

View File

@@ -17,9 +17,9 @@ class ReSaleOrder(models.Model):
'sale_order_line_id': ret.id,
}
demand_plan_info = self.env['sf.demand.plan'].sudo().create(vals)
vals.update({'demand_plan_id': demand_plan_info.id})
vals.update({'demand_plan_id': demand_plan_info.id, 'plan_uom_qty': ret.product_uom_qty})
demand_plan = self.env['sf.production.demand.plan'].sudo().create(vals)
demand_plan_info.write({'line_ids': demand_plan.id})
demand_plan_info.write({'line_ids': demand_plan.ids})
if demand_plan.product_id.machining_drawings_name:
filename_url = demand_plan.product_id.machining_drawings_name.rsplit('.', 1)[0]
wizard_vals = {