mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_production_project_estimated_cost: convert attribute lines for the creation of a MO.
This commit is contained in:
committed by
Oihane Crucelaegui
parent
c17bfb5765
commit
63dc1aa587
@@ -45,11 +45,13 @@ class WizCreateFictitiousOf(models.TransientModel):
|
||||
if 'routing_id' in vals:
|
||||
routing = routing_obj.browse(vals['routing_id'])
|
||||
product_qty = production_obj._get_min_qty_for_production(
|
||||
routing)
|
||||
routing) or 1
|
||||
vals['product_qty'] = product_qty
|
||||
prod_vals = production_obj.product_id_change(
|
||||
product.id, product_qty)['value']
|
||||
vals.update(prod_vals)
|
||||
vals['product_attributes'] = [tuple([0, 0, line]) for line in
|
||||
vals.get('product_attributes', [])]
|
||||
new_production = production_obj.create(vals)
|
||||
new_production.action_compute()
|
||||
new_production.calculate_production_estimated_cost()
|
||||
|
||||
Reference in New Issue
Block a user