Browse Source

[FIX] use a tuple instead of a list

pull/2/head
Guewen Baconnier 11 years ago
parent
commit
e477bfdc81
  1. 3
      partner_firstname/partner.py

3
partner_firstname/partner.py

@ -33,8 +33,7 @@ class ResPartner(Model):
def _compute_name_custom(self, cursor, uid, ids, fname, arg, context=None): def _compute_name_custom(self, cursor, uid, ids, fname, arg, context=None):
res = {} res = {}
for rec in self.read(cursor, uid, ids, ['firstname', 'lastname']): for rec in self.read(cursor, uid, ids, ['firstname', 'lastname']):
names = [rec['lastname'],
rec['firstname']]
names = (rec['lastname'], rec['firstname'])
fullname = " ".join([s for s in names if s]) fullname = " ".join([s for s in names if s])
res[rec['id']] = fullname res[rec['id']] = fullname
return res return res

Loading…
Cancel
Save