[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
This commit is contained in:
Nicolas Martinelli 2015-05-29 10:36:28 +02:00
parent 3274f8c94c
commit 46eb9e2639
1 changed files with 1 additions and 0 deletions

View File

@ -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')