1 # -*- coding: utf-8 -*-
2 from osv
import fields
, osv
4 class Occupation(osv
.osv
):
5 _name
= 'bikecoop.partner.occupation'
6 _description
= 'If partner is a person, what is his job or studies'
9 'code': fields
.char('Code', size
=8, help='Code of the occupation'),
10 'name': fields
.char('Name', size
=128, help='Name of the job or studies', required
=True),
11 'active': fields
.boolean('Active', help='If check, this object is always available'),
15 'active': lambda *a
: 1,
21 class Partner(osv
.osv
):
22 _inherit
= 'res.partner'
25 'associate_members': fields
.one2many('res.partner', 'associate_member', 'Associate members', help='Members who are associated to this partner.'),
26 'nationality_id': fields
.many2one('res.country', 'Nationality', help='Partner\'s nationality if he is a person'),
27 'occupation_id': fields
.many2one('bikecoop.partner.occupation', 'Job or studies', help='Partner`s job or studies if he is a person'),
32 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: