Ignore context uom if it is from different category than the product one

issue7798
review68361002
This commit is contained in:
Sergi Almacellas Abellana committed 2018-11-07 16:12:31 +01:00
1 parent d855e50679
commit 31220ae686
1 file changed
+2
+2
View File
@@ -34,6 +34,8 @@ class Product(metaclass=PoolMeta):
taxes = Tax.browse(context.get('taxes'))
for product in products:
uom = context_uom or product.default_uom
if uom.category != product.default_uom.category:
uom = product.default_uom
price = price_list.compute(
customer, product, prices[product.id], quantity, uom)
if price_list.tax_included and taxes: