Fixed a bug which set the domain to None on the search_quantity method

This commit is contained in:
Sergi Carol 2017-06-12 15:27:41 +02:00
parent bb93aa084c
commit 81bbb6e8ce
1 changed files with 1 additions and 2 deletions

View File

@ -54,7 +54,6 @@ class Product:
today = Date.today()
context = Transaction().context
# not locations in context
if not context.get('locations'):
warehouses = Location.search([('type', '=', 'warehouse')])
@ -62,4 +61,4 @@ class Product:
with Transaction().set_context(locations=location_ids, stock_date_end=today):
return cls._search_quantity(name, location_ids, domain)
# return super (with locations in context)
return super(Product, cls).search_quantity(name, domain=None)
return super(Product, cls).search_quantity(name, domain)