From: Ludovic CHEVALIER Date: Thu, 6 Sep 2012 07:12:52 +0000 (+0200) Subject: [member] +benevolat X-Git-Url: http://git.cyclocoop.org/?p=burette%2Fbikecoop.git;a=commitdiff_plain;h=8b5df04563347c537607a832d3e7897d63041363 [member] +benevolat --- diff --git a/bikecoop.py b/bikecoop.py index bc8b677..9bbda04 100644 --- a/bikecoop.py +++ b/bikecoop.py @@ -1,13 +1,14 @@ # -*- 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'), } @@ -15,7 +16,7 @@ class Occupation(osv.osv): 'active': lambda *a: 1, } -Occupation() +Theme() class Partner(osv.osv): @@ -24,7 +25,8 @@ 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() diff --git a/data/bikecoop.xml b/data/bikecoop.xml index ba29ea4..6b981bb 100644 --- a/data/bikecoop.xml +++ b/data/bikecoop.xml @@ -1,13 +1,15 @@ - + none No job or studies at the moment + occupation - + other An other type of occupation that is not mentionned + occupation diff --git a/data/res_partner.xml b/data/res_partner.xml index 75b7223..fe649b3 100644 --- a/data/res_partner.xml +++ b/data/res_partner.xml @@ -16,5 +16,8 @@ Liste d'information + + Studies + diff --git a/demo/bikecoop.xml b/demo/bikecoop.xml index b331325..465ac43 100644 --- a/demo/bikecoop.xml +++ b/demo/bikecoop.xml @@ -1,37 +1,66 @@ - + upmf Studies: Université Pierre Mendès France + occupation - + us Studies: Université Stendhal + occupation - + ujf Studies: Université Joseph Fourrier + occupation - + inpg Studies: INPG + occupation - + OTH_STUD Studies: Other studies, university that is not mentionned + occupation - + FARM Farmer + occupation - + EMP Employee + occupation - + OTH_JOB An other job that is not mentionned + occupation + + + + COM_COM + Communication committee + volunteer + + + WKS_COM + Worshop committee + volunteer + + + ANIM_COM + Animation committee + volunteer + + + ADMIN_COM + Administration committee + volunteer diff --git a/view/bikecoop_membership.xml b/view/bikecoop_membership.xml index de6ff76..73597e2 100644 --- a/view/bikecoop_membership.xml +++ b/view/bikecoop_membership.xml @@ -49,7 +49,8 @@ - + +