[FIX] mrp: change BOM

- Create a MO for Product A with quantity to produce of 2
- Produce 1
- Open the associated BOM, and add a line to the bom
- Go back to the MO and try to update the qty to produce to 1

Traceback: division by 0

opw-1838006
This commit is contained in:
Nicolas Martinelli
2018-04-20 10:11:11 +02:00
committed by Nicolas Martinelli
parent 23431389c3
commit 0dd08bd148
+1 -1
View File
@@ -349,7 +349,7 @@ class MrpProduction(models.Model):
source_location = routing.location_id
else:
source_location = self.location_src_id
original_quantity = self.product_qty - self.qty_produced
original_quantity = (self.product_qty - self.qty_produced) or 1.0
data = {
'sequence': bom_line.sequence,
'name': self.name,