diff --git a/inventory.py b/inventory.py
index 6e0d2d712d..63944a867d 100644
--- a/inventory.py
+++ b/inventory.py
@@ -27,18 +27,13 @@ class CreateInventoriesInit(WizardOSV):
location_ids = location_obj.search(cursor, user,
self.lost_found.domain, context=context)
if len(location_ids) == 1:
- return location_obj.name_get(cursor, user, location_ids,
- context=context)[0]
+ return location_ids[0]
return False
def default_company(self, cursor, user, context=None):
- company_obj = self.pool.get('company.company')
if context is None:
context = {}
- if context.get('company'):
- return company_obj.name_get(cursor, user, context['company'],
- context=context)[0]
- return False
+ return context.get('company', False)
CreateInventoriesInit()
diff --git a/inventory.xml b/inventory.xml
index 16cb11a706..a65bb009b1 100644
--- a/inventory.xml
+++ b/inventory.xml
@@ -34,7 +34,7 @@ this repository contains the full copyright notices and license terms. -->
-
+