diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp/models/mrp_unbuild.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/models/mrp_unbuild.py b/addons/mrp/models/mrp_unbuild.py index 95f13ac7fa3..77537b55d0e 100644 --- a/addons/mrp/models/mrp_unbuild.py +++ b/addons/mrp/models/mrp_unbuild.py @@ -116,7 +116,7 @@ class MrpUnbuild(models.Model): def _onchange_product_id(self): if self.product_id: self.bom_id = self.env['mrp.bom']._bom_find(product=self.product_id, company_id=self.company_id.id) - self.product_uom_id = self.product_id.uom_id.id + self.product_uom_id = self.mo_id.product_id == self.product_id and self.mo_id.product_uom_id.id or self.product_id.uom_id.id @api.constrains('product_qty') def _check_qty(self): |
