1 # -*- coding: utf-8 -*-
2 from osv
import fields
, osv
6 _name
= 'bikecoop.partner.theme'
7 _description
= 'Themes that could be related to a partner'
10 'code': fields
.char('Code', size
=8, help='Code of the occupation'),
11 'name': fields
.char('Name', size
=128, help='Name of the job or studies', required
=True, translate
=True),
12 'domain': fields
.selection([('gender', 'Gender'), ('occupation', 'Occupation'), ('volunteer', 'Volunteer')], 'Domain', required
=True, size
=24),
13 'active': fields
.boolean('Active', help='If check, this object is always available'),
17 'active': lambda *a
: 1,
23 class Partner(osv
.osv
):
24 _inherit
= 'res.partner'
27 'nationality_id': fields
.many2one('res.country', 'Nationality', help='Partner\'s nationality if he is a person'),
28 'occupation_id': fields
.many2one('bikecoop.partner.theme', 'Occupation', help='Main occupation of this partner'),
29 'volunteer_ids': fields
.many2many('bikecoop.partner.theme', 'res_partner_bikecoop_theme_rel', 'partner_id', 'theme_id', 'Want to be volunteer?', help='What kind of volunteer activities you want to do with us?'),
30 'gender_id': fields
.many2one('bikecoop.partner.theme', 'Gender'),
35 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: