res = []
for r in self.read(cr, user, ids, ['name','first_name','title']):
addr = r['title'] and str(r['title'])+" " or ''
- addr +=str(r['name'] or '')
+ addr += r.get('name', '')
if r['name'] and r['first_name']:
addr += ' '
- addr += str(r['first_name'] or '')
+ addr += r.get('first_name', '')
res.append((r['id'], addr))
return res
res_partner_contact()
res.append((r['id'], r['partner_id'][1]))
else:
addr = str('')
- addr += str(r['street'] or '') + ' ' + str(r['zip'] or '') + ' ' + str(r['city'] or '')
+ addr += "%s %s %s" % ( r.get('street', ''), r.get('zip', ''), r.get('city', '') )
res.append((r['id'], addr.strip() or '/'))
return res
_description ='Partner Address'
_columns = {
'job_ids':fields.one2many('res.partner.job', 'address_id', 'Contacts'),
- 'email': fields.related('job_ids', 'email', type='char', string='Default Email'),
}
res_partner_address()
'address_id':fields.many2one('res.partner.address','Address'),
'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
'function_id': fields.many2one('res.partner.function','Job Title'),
- 'sequence_contact':fields.integer('Sequence (Contact)',help='order of importance of this address in the list of addresses of the linked contact'),
- 'sequence_partner':fields.integer('Sequence (Partner)',help='order of importance of this job title in the list of job title of the linked partner'),
+ 'sequence_contact':fields.integer('Sequence',help='Order of importance of this address in the list of addresses of the linked contact'),
+ 'sequence_partner':fields.integer('Sequence',help='Order of importance of this job title in the list of job title of the linked partner'),
'email': fields.char('E-Mail', size=240),
'phone': fields.char('Phone', size=64),
'date_start' : fields.date('Date Start'),