Skip to content
Browse files

[FIX] mrp: compute 'is_produced' only when production

- when there is no any production then rounding is none and it gives traceback.
- so, set rounding only when there is production.

Related to Issue: 1957994
  • Loading branch information...
pka-odoo committed Mar 26, 2019
1 parent 9ea4fef commit edcaa0aa997f1d32c7a1c5bf52636528aadb656f
Showing with 2 additions and 0 deletions.
  1. +2 −0 addons/mrp/models/
@@ -125,6 +125,8 @@ def name_get(self):
@api.depends('production_id.product_qty', 'qty_produced')
def _compute_is_produced(self):
if not self.production_id:
rounding = self.production_id.product_uom_id.rounding
self.is_produced = float_compare(self.qty_produced, self.production_id.product_qty, precision_rounding=rounding) >= 0

0 comments on commit edcaa0a

Please sign in to comment.
You can’t perform that action at this time.