diff --git a/addons/mrp/models/mrp_unbuild.py b/addons/mrp/models/mrp_unbuild.py index 328a51123a7..696f605c220 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(self.product_id, company_id=self.company_id.id)[self.product_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):