- 'name': fields.function(_get_partner_id, method=True, type='many2one', relation='res.partner', string='Partner'),
- 'address_id':fields.many2one('res.partner.address','Address', required=True),
- 'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
- 'function_id': fields.many2one('res.partner.function','Function', required=True),
- '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 function in the list of functions of the linked partner'),
+ 'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
+ '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',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'),