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 7992e05285
commit 190ecda367

View file

@ -63,7 +63,6 @@ class Product:
today = Date.today()
context = Transaction().context
# not locations in context
if not context.get('locations'):
warehouses = Location.search([('type', '=', 'warehouse')])
@ -71,4 +70,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)