From b38245d6cbfeeb307d3ea62a95cda962d57e6ba9 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 5 Mar 2014 12:03:14 +0100 Subject: [PATCH] [FIX] product: price_get_multi raise if there is no active pricelist version (same behavior than before the pricelist computation factoring) bzr revid: dle@openerp.com-20140305110314-pgiotwksjmdt63zm --- addons/product/pricelist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 65c4311f34a..67ab3649b3b 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -180,7 +180,8 @@ class product_pricelist(osv.osv): if ((v.date_start is False) or (v.date_start <= date)) and ((v.date_end is False) or (v.date_end >= date)): version = v break - + if not version: + raise osv.except_osv(_('Warning!'), _("At least one pricelist has no active version !\nPlease create or activate one.")) categ_ids = {} for p in products: categ = p.categ_id