# -*- coding: utf-8 -*-
from osv import fields, osv
-class Occupation(osv.osv):
- _name = 'bikecoop.partner.occupation'
- _description = 'If partner is a person, what is his job or studies'
+class Theme(osv.osv):
+ _name = 'bikecoop.partner.theme'
+ _description = 'Themes that could be related to a partner'
_columns = {
'code': fields.char('Code', size=8, help='Code of the occupation'),
'name': fields.char('Name', size=128, help='Name of the job or studies', required=True),
+ 'domain': fields.char('Domain', size=64, help='Domain for filtering results'),
'active': fields.boolean('Active', help='If check, this object is always available'),
}
'active': lambda *a: 1,
}
-Occupation()
+Theme()
class Partner(osv.osv):
_columns = {
'associate_members': fields.one2many('res.partner', 'associate_member', 'Associate members', help='Members who are associated to this partner.'),
'nationality_id': fields.many2one('res.country', 'Nationality', help='Partner\'s nationality if he is a person'),
- 'occupation_id': fields.many2one('bikecoop.partner.occupation', 'Job or studies', help='Partner`s job or studies if he is a person'),
+ 'occupation_id': fields.many2one('bikecoop.partner.theme', 'Occupation', help='Main occupation of this partner'),
+ 'volunteer_ids': fields.many2many('bikecoop.partner.theme', 'res_partner_bikecoop_theme_rel', 'partner_id', 'theme_id', 'What kind of volunteer activities you want to do with us?'),
}
Partner()