[IMP] Improve the code
bzr revid: dbr@tinyerp.com-20110630090152-rgfh2y8wvs6l8omj
This commit is contained in:
parent
ffe4df20d4
commit
c7b27ed027
|
@ -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={
|
||||
|
|
Loading…
Reference in New Issue