Add missing super call in Product and Location to view_header_get for issue1695

This commit is contained in:
Cédric Krier committed 2010-09-19 18:39:29 +02:00
1 parent 8f69bf7fc9
commit a445ac90e1
2 files changed
+4

No files matched your search

+2
View File
@@ -169,6 +169,8 @@ class Location(ModelSQL, ModelView):
def view_header_get(self, value, view_type='form'):
product_obj = self.pool.get('product.product')
value = super(Location, self).view_header_get(value,
view_type=view_type)
if (Transaction().context.get('product')
and isinstance(Transaction().context['product'], (int, long))):
with Transaction().set_context(active_test=False):
+2
View File
@@ -508,6 +508,8 @@ class Product(ModelSQL, ModelView):
return res
def view_header_get(self, value, view_type='form'):
value = super(Product, self).view_header_get(value,
view_type=view_type)
if not Transaction().context.get('locations'):
return value
location_obj = self.pool.get('stock.location')