[FIX] stock: correct order of query parameters, broken in commit 6848
bzr revid: odo@openerp.com-20120619074007-bp2snzj1uoybayxp
This commit is contained in:
parent
de8edaf0e0
commit
736a3e5811
|
@ -248,6 +248,8 @@ class product_product(osv.osv):
|
||||||
elif to_date:
|
elif to_date:
|
||||||
date_str = "date<=%s"
|
date_str = "date<=%s"
|
||||||
date_values = [to_date]
|
date_values = [to_date]
|
||||||
|
if date_values:
|
||||||
|
where.append(tuple(date_values))
|
||||||
|
|
||||||
prodlot_id = context.get('prodlot_id', False)
|
prodlot_id = context.get('prodlot_id', False)
|
||||||
prodlot_clause = ''
|
prodlot_clause = ''
|
||||||
|
@ -255,9 +257,7 @@ class product_product(osv.osv):
|
||||||
prodlot_clause = ' and prodlot_id = %s '
|
prodlot_clause = ' and prodlot_id = %s '
|
||||||
where += [prodlot_id]
|
where += [prodlot_id]
|
||||||
|
|
||||||
# TODO: perhaps merge in one query.
|
# TODO: perhaps merge in one query.
|
||||||
if date_values:
|
|
||||||
where.append(tuple(date_values))
|
|
||||||
if 'in' in what:
|
if 'in' in what:
|
||||||
# all moves from a location out of the set to a location in the set
|
# all moves from a location out of the set to a location in the set
|
||||||
cr.execute(
|
cr.execute(
|
||||||
|
|
Loading…
Reference in New Issue