[FIX] mrp: fixed product inventory uom issue
Before this commit, we are getting error that product_uom must be matched because when we're adding line to inventory after updating the quantity, product_uom changes to Units. After this commit, error will not be generated as the default value of product_uom_id is removed. Fixes #29305 closes odoo/odoo#29371
This commit is contained in:
committed by
Nicolas Martinelli
parent
17547c1717
commit
689cc4935c
@@ -331,8 +331,7 @@ class InventoryLine(models.Model):
|
||||
index=True, required=True)
|
||||
product_uom_id = fields.Many2one(
|
||||
'uom.uom', 'Product Unit of Measure',
|
||||
required=True,
|
||||
default=lambda self: self.env.ref('uom.product_uom_unit', raise_if_not_found=True))
|
||||
required=True)
|
||||
product_uom_category_id = fields.Many2one(string='Uom category', related='product_uom_id.category_id', readonly=True)
|
||||
product_qty = fields.Float(
|
||||
'Checked Quantity',
|
||||
|
||||
Reference in New Issue
Block a user