Skip to content
Snippets Groups Projects
Commit 220bdb35 authored by Josse Colpaert's avatar Josse Colpaert
Browse files

[FIX] mrp: qty producing on update qty of mo

When updating the quantity of an MO, the qty we are producing on a work
order should possibly be updated.  When the finished product is tracked
by serial number it should be 1.0 when some quantity is still to be
treated.  (and not 0 as before)

opw-785190
parent 067a241e
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ class ChangeProductionQty(models.TransientModel):
cycle_number * operation.time_cycle * 100.0 / operation.workcenter_id.time_efficiency)
quantity = wo.qty_production - wo.qty_produced
if production.product_id.tracking == 'serial':
quantity = 1.0 if float_is_zero(quantity, precision_digits=precision) else 0.0
quantity = 1.0 if not float_is_zero(quantity, precision_digits=precision) else 0.0
else:
quantity = quantity if (quantity > 0) else 0
if float_is_zero(quantity, precision_digits=precision):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment