Avoid reading all category uoms when testing uom.category
issue5982 review28951002
This commit is contained in:
1 parent
3075a85626
commit
1c6437b9c3
1 file changed
+1
-1
+1
-1
@@ -1782,7 +1782,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
|
||||
self.description = Product(self.product.id).rec_name
|
||||
|
||||
category = self.product.default_uom.category
|
||||
if not self.unit or self.unit not in category.uoms:
|
||||
if not self.unit or self.unit.category != category:
|
||||
self.unit = self.product.default_uom.id
|
||||
self.unit_digits = self.product.default_uom.digits
|
||||
|
||||
|
||||
Reference in new issue
Block a user