diff --git a/purchase_request.py b/purchase_request.py index ec3784bb12..adc82347f9 100644 --- a/purchase_request.py +++ b/purchase_request.py @@ -166,7 +166,8 @@ class PurchaseRequest(OSV): for min_date in date2products: product_ids = [x[0].id for x in date2products[min_date]] local_context.update( - {'stock_date_end': min_date or datetime.date.max}) + {'stock_date_end': min_date or datetime.date.max, + 'stock_skip_warehouse': True}) pbl = product_obj.products_by_location( cursor, user, warehouse_ids, product_ids, with_childs=True, skip_zero=False, context=local_context)