From 31220ae686fc0644a8373c42259e098a740a03bf Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 7 Nov 2018 16:12:31 +0100 Subject: [PATCH] Ignore context uom if it is from different category than the product one issue7798 review68361002 --- product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product.py b/product.py index de62056476..c9d8f858d8 100644 --- a/product.py +++ b/product.py @@ -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: