X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=bikecoop.py;h=9bbda04299c01fee40e7c215a0caf5c835f9d198;hb=8b5df04563347c537607a832d3e7897d63041363;hp=51c44176ac5b0fd9d31803100ecf4a4498846cc5;hpb=21171b7632021f31d645043f8a956ee7ba3c37d5;p=burette%2Fbikecoop.git diff --git a/bikecoop.py b/bikecoop.py index 51c4417..9bbda04 100644 --- a/bikecoop.py +++ b/bikecoop.py @@ -1,14 +1,14 @@ # -*- coding: utf-8 -*- from osv import fields, osv - -class Studies(osv.osv): - _name = 'bikecoop.studies' - _description = 'If partner is student, what is his school.' +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 school'), - 'name': fields.char('Name', size=128, help='Name of the school.', required=True), + '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'), } @@ -16,18 +16,17 @@ class Studies(osv.osv): 'active': lambda *a: 1, } -Studies() +Theme() class Partner(osv.osv): _inherit = 'res.partner' _columns = { - 'studies_id': fields.many2one('bikecoop.studies', 'School', help='If partner is student, school where he is studing.'), - } - - _defaults = { - 'studies_id': lambda *a: 1, + '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.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()