summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: