[FIX] stock: correct order of query parameters, broken in commit 6848

bzr revid: odo@openerp.com-20120619074007-bp2snzj1uoybayxp
This commit is contained in:
Olivier Dony 2012-06-19 09:40:07 +02:00
parent de8edaf0e0
commit 736a3e5811
1 changed files with 3 additions and 3 deletions

View File

@ -248,6 +248,8 @@ class product_product(osv.osv):
elif to_date:
date_str = "date<=%s"
date_values = [to_date]
if date_values:
where.append(tuple(date_values))
prodlot_id = context.get('prodlot_id', False)
prodlot_clause = ''
@ -255,9 +257,7 @@ class product_product(osv.osv):
prodlot_clause = ' and prodlot_id = %s '
where += [prodlot_id]
# TODO: perhaps merge in one query.
if date_values:
where.append(tuple(date_values))
# TODO: perhaps merge in one query.
if 'in' in what:
# all moves from a location out of the set to a location in the set
cr.execute(