[FIX] stock: filter products on locations
Filtering product.product based on the location crashed due to fields_view_get override exepecting an integer in the context. Fixes #5164 Closes #5218
This commit is contained in:
parent
207cf92a0c
commit
5e475f75de
|
@ -285,7 +285,7 @@ class product_product(osv.osv):
|
|||
toolbar=toolbar, submenu=submenu)
|
||||
if context is None:
|
||||
context = {}
|
||||
if ('location' in context) and context['location']:
|
||||
if context.get('location') and isinstance(context['location'], int):
|
||||
location_info = self.pool.get('stock.location').browse(cr, uid, context['location'])
|
||||
fields=res.get('fields',{})
|
||||
if fields:
|
||||
|
|
Loading…
Reference in New Issue