下达生产
This commit is contained in:
@@ -10,5 +10,14 @@ class ReSaleOrder(models.Model):
|
||||
'sale_order_id': ret.order_id.id,
|
||||
'sale_order_line_id': ret.id,
|
||||
}
|
||||
self.env['sf.production.demand.plan'].sudo().create(vals)
|
||||
demand_plan = self.env['sf.production.demand.plan'].sudo().create(vals)
|
||||
if demand_plan.product_id.machining_drawings_name:
|
||||
filename_url = demand_plan.product_id.machining_drawings_name.rsplit('.', 1)[0]
|
||||
wizard_vals = {
|
||||
'demand_plan_id': demand_plan.id,
|
||||
'model_id': demand_plan.model_id,
|
||||
'filename_url': filename_url,
|
||||
'type': '1',
|
||||
}
|
||||
self.env['sf.demand.plan.print.wizard'].sudo().create(wizard_vals)
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user