Browse Source

[FIX] missing propagation of the context

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

4
partner_firstname/partner.py

@ -32,7 +32,9 @@ 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']):
partners = self.read(cursor, uid, ids,
['firstname', 'lastname'], context=context)
for rec in partners:
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

Loading…
Cancel
Save