Avoid reading all category uoms when testing uom.category
issue5982 review30701002
This commit is contained in:
1 parent
18e5d06f54
commit
f755219855
1 file changed
+1
-2
+1
-2
@@ -483,8 +483,7 @@ class SaleOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
return
|
||||
|
||||
category = self.product.sale_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.sale_uom
|
||||
self.unit_digits = self.product.sale_uom.digits
|
||||
|
||||
|
||||
Reference in new issue
Block a user