From 46eb9e2639300345acac19de27d226de4ef9be54 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 29 May 2015 10:36:28 +0200 Subject: [PATCH] [FIX] product: cut date to keep format '%Y-%m-%d' Ensures the date format is '%Y-%m-%d', since it is the format of pricelist.version_id.date_start/date_end. opw-640436 --- addons/product/pricelist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index db24e3a5e15..f0cc3e77fa7 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -197,6 +197,7 @@ class product_pricelist(osv.osv): def _price_rule_get_multi(self, cr, uid, pricelist, products_by_qty_by_partner, context=None): context = context or {} date = context.get('date') or time.strftime('%Y-%m-%d') + date = date[0:10] products = map(lambda x: x[0], products_by_qty_by_partner) currency_obj = self.pool.get('res.currency')