Merge lp:~savoirfairelinux-openerp/partner-contact-management/add_new_function_passport into lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions

Status: Merged
Merged at revision: 45
Proposed branch: lp:~savoirfairelinux-openerp/partner-contact-management/add_new_function_passport
Merge into: lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions
Diff against target: 23 lines (+15/-0)
1 file modified
passport/res_passport.py (+15/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/partner-contact-management/add_new_function_passport
Reviewer Review Type Date Requested Status
Sandy Carter (http://www.savoirfairelinux.com) Pending
Review via email: mp+205001@code.launchpad.net

Description of the change

- Display "country | name" when we select a passport on the listbox.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'passport/res_passport.py'
--- passport/res_passport.py 2014-01-29 16:45:40 +0000
+++ passport/res_passport.py 2014-02-05 16:44:40 +0000
@@ -42,4 +42,19 @@
42 help="Gender."),42 help="Gender."),
43 }43 }
4444
45 def name_get(self, cr, uid, ids, context=None):
46 if context is None:
47 context = {}
48 if isinstance(ids, (int, long)):
49 ids = [ids]
50 res = []
51 reads = self.read(cr, uid, ids, ['name', 'country_id'], context)
52
53 for record in reads:
54 name = record['name']
55 if record['country_id']:
56 name = record['country_id'][1] + ' | ' + name
57 res.append((record['id'], name))
58 return res
59
45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:60# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches

to all changes: