From 86ffb5b4511947176c7211afd3b7730906347b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Feb 2009 17:48:46 +0100 Subject: [PATCH] Check context value in view_header_get on stock.location --- location.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/location.py b/location.py index 47d9315f0f..4b82b8ad5c 100644 --- a/location.py +++ b/location.py @@ -166,8 +166,13 @@ class Location(OSV): uom_obj = self.pool.get('product.uom') if context is None: context = {} + ctx = context.copy() + ctx['active_test'] = False if context.get('product') \ - and isinstance(context['product'], (int, long)): + and isinstance(context['product'], (int, long)) \ + and product_obj.search(cursor, user, [ + ('id', '=', context['product']), + ], context=ctx): product_name = product_obj.name_get(cursor, user, context['product'], context=context)[0][1] product = product_obj.browse(cursor, user, context['product'],