bzr revid: fp@tinyerp.com-20120929124148-z5k9gckanwrsjdgx
This commit is contained in:
Fabien Pinckaers 2012-09-29 14:41:48 +02:00
commit 2a0e35be82
1 changed files with 2 additions and 4 deletions

View File

@ -261,7 +261,7 @@ class product_product(osv.osv):
to_date = context.get('to_date',False)
date_str = False
date_values = False
where = [tuple(location_ids),tuple(location_ids),tuple(ids),tuple(states)]
where = [tuple(location_ids),tuple(ids),tuple(states)]
if from_date and to_date:
date_str = "date>=%s and date<=%s"
where.append(tuple([from_date]))
@ -283,8 +283,7 @@ class product_product(osv.osv):
cr.execute(
'select sum(product_qty), product_id, product_uom '\
'from stock_move '\
'where location_id NOT IN %s '\
'and location_dest_id IN %s '\
'where location_dest_id IN %s '\
'and product_id IN %s '\
'' + (prodlot_id and ('and prodlot_id = ' + str(prodlot_id)) or '') + ' '\
'and state IN %s ' + (date_str and 'and '+date_str+' ' or '') +' '\
@ -296,7 +295,6 @@ class product_product(osv.osv):
'select sum(product_qty), product_id, product_uom '\
'from stock_move '\
'where location_id IN %s '\
'and location_dest_id NOT IN %s '\
'and product_id IN %s '\
'' + (prodlot_id and ('and prodlot_id = ' + str(prodlot_id)) or '') + ' '\
'and state in %s ' + (date_str and 'and '+date_str+' ' or '') + ' '\