diff options
| author | Denis Ledoux <dle@openerp.com> | 2014-03-05 12:03:14 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2014-03-05 12:03:14 +0100 |
| commit | b38245d6cbfeeb307d3ea62a95cda962d57e6ba9 (patch) | |
| tree | f10869f41037d8372fde15830de1e495887228d1 | |
| parent | 6d97f749638c8d59946475e1818b1e2a339971bd (diff) | |
[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
| -rw-r--r-- | addons/product/pricelist.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
