summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2015-07-06 16:28:48 +0200
committerMartin Trigaux <mat@odoo.com>2015-07-06 16:28:48 +0200
commit5e475f75de2a2dff24d6ae0b03d7ec4622a8c8a5 (patch)
tree7236c38c4dda0e5b6880f4bb596e7122ccbef703
parent207cf92a0c4120e561f5e2c28adff1b1ed7c10a5 (diff)
[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
-rw-r--r--addons/stock/product.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 1a302801e1d..65c09448f7b 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -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: