[IMP] Improve the code

bzr revid: dbr@tinyerp.com-20110630090152-rgfh2y8wvs6l8omj
This commit is contained in:
DBR (OpenERP) 2011-06-30 14:31:52 +05:30
parent ffe4df20d4
commit c7b27ed027
1 changed files with 1 additions and 2 deletions

View File

@ -243,8 +243,7 @@ class user_preference(osv.osv_memory):
host_name = ''
if ids:
ids = len(ids)> 1 and len(ids)-1 or ids[0] # Use len(ids)-1 for taking the value of last id
host_obj = self.browse(cr, uid,[ids],context=context)[0]
host_name = host_obj.host_name
host_name = self.browse(cr, uid,[ids],context=context)[0].host_name
return host_name
_defaults={