Skip to content
Browse files

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

- when there is no production for the workorder, then it will return rounding as none and in result it will throw 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 660dbbdf3b150ac8599e5cfa9fc294074c17b824
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 660dbbd

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