From e2a8f7c61c92901f509be7cd10c692d4746be3db Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 25 Nov 2016 12:06:54 +0100 Subject: [PATCH] [FIX] product: ensure at least 1 item when computing price from pricelist --- addons/product/models/product_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 911481a003b..ef0f698424b 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -160,7 +160,7 @@ class ProductTemplate(models.Model): if pricelist_id_or_name: pricelist = None partner = self._context.get('partner') - quantity = self._context.get('quantity') + quantity = self._context.get('quantity', 1.0) # Support context pricelists specified as display_name or ID for compatibility if isinstance(pricelist_id_or_name, basestring):