[FIX] mrp_byproduct: take into account operation where byproduct gets produced
As the field is not shown in the view, it is just done because the field is still there and easy to do.
This commit is contained in:
@@ -63,6 +63,7 @@ class ChangeProductionQty(models.TransientModel):
|
||||
wo.state = 'progress'
|
||||
# assign moves; last operation receive all unassigned moves
|
||||
operation = wo.operation_id
|
||||
|
||||
|
||||
# TODO: following could be put in a function as it is similar as code in _workorders_create
|
||||
# TODO: only needed when creating new moves
|
||||
|
||||
@@ -23,6 +23,7 @@ class MrpProduction(models.Model):
|
||||
'product_uom': sub_product.product_uom_id.id,
|
||||
'location_id': source,
|
||||
'location_dest_id': production.location_dest_id.id,
|
||||
'operation_id': sub_product.operation_id.id,
|
||||
'production_id': production.id,
|
||||
'origin': production.name,
|
||||
'unit_factor': qty1 / (production.product_qty - production.qty_produced),
|
||||
|
||||
Reference in New Issue
Block a user