[ADD]GOLEM Member Skills on partners too

This commit is contained in:
Fabien Bourgeois 2016-07-13 19:36:25 +02:00
parent 7a1e475163
commit bb91b5c3bb
6 changed files with 86 additions and 13 deletions

View File

@ -26,5 +26,5 @@
'application': False, 'application': False,
'installable': True, 'installable': True,
'depends': ['golem_member'], 'depends': ['golem_member'],
'data': ['golem_member_view.xml'] 'data': ['golem_member_view.xml', 'res_partner_view.xml']
} }

View File

@ -18,8 +18,8 @@
from openerp import models, fields from openerp import models, fields
class GolemMember(models.Model): class ResPartner(models.Model):
_inherit = 'golem.member' _inherit = 'res.partner'
is_volunteer = fields.Boolean('Volunteer?') is_volunteer = fields.Boolean('Volunteer?')
skill_ids = fields.Many2many('golem.member.skill', string='Skills') skill_ids = fields.Many2many('golem.member.skill', string='Skills')

View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<openerp> <openerp>
<data> <data>
<!-- Form --> <!-- Form -->
<record model="ir.ui.view" id="skills_form"> <record model="ir.ui.view" id="golem_member_skills_form">
<field name="name">Add skills to Others tab</field> <field name="name">Add skills to Others tab</field>
<field name="model">golem.member</field> <field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.view_form" /> <field name="inherit_id" ref="golem_member.view_form" />
@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field> </field>
</record> </record>
<!-- Searches --> <!-- Searches -->
<record model="ir.ui.view" id="skills_search"> <record model="ir.ui.view" id="golem_member_skills_search">
<field name="name">Add Skills Search and Filter</field> <field name="name">Add Skills Search and Filter</field>
<field name="model">golem.member</field> <field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.view_filter" /> <field name="inherit_id" ref="golem_member.view_filter" />

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-28 03:18+0000\n" "POT-Creation-Date: 2016-07-13 17:33+0000\n"
"PO-Revision-Date: 2016-06-28 03:18+0000\n" "PO-Revision-Date: 2016-07-13 17:33+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -52,7 +52,8 @@ msgid "ID"
msgstr "ID" msgstr "ID"
#. module: golem_member_skills #. module: golem_member_skills
#: view:golem.member:golem_member_skills.skills_search #: view:golem.member:golem_member_skills.golem_member_skills_search
#: view:res.partner:golem_member_skills.res_partner_skills_search
msgid "Is volunteer" msgid "Is volunteer"
msgstr "Est bénévole" msgstr "Est bénévole"
@ -81,6 +82,11 @@ msgstr "Les compétences adhérents doivent être unique."
msgid "Member skills" msgid "Member skills"
msgstr "Compétences de l'adhérent" msgstr "Compétences de l'adhérent"
#. module: golem_member_skills
#: model:ir.model,name:golem_member_skills.model_res_partner
msgid "Partner"
msgstr "Partenaire"
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member.skill,name:0 #: field:golem.member.skill,name:0
msgid "Skill" msgid "Skill"
@ -88,16 +94,20 @@ msgstr "Compétence"
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member,skill_ids:0 #: field:golem.member,skill_ids:0
#: view:res.partner:golem_member_skills.res_partner_skills_form
#: field:res.partner,skill_ids:0
msgid "Skills" msgid "Skills"
msgstr "Compétences" msgstr "Compétences"
#. module: golem_member_skills #. module: golem_member_skills
#: view:golem.member:golem_member_skills.skills_form #: view:golem.member:golem_member_skills.golem_member_skills_form
#: view:res.partner:golem_member_skills.res_partner_skills_form
msgid "Skills..." msgid "Skills..."
msgstr "Compétences..." msgstr "Compétences..."
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member,is_volunteer:0 #: field:golem.member,is_volunteer:0
#: field:res.partner,is_volunteer:0
msgid "Volunteer?" msgid "Volunteer?"
msgstr "Bénévole?" msgstr "Bénévole?"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-28 03:17+0000\n" "POT-Creation-Date: 2016-07-13 17:32+0000\n"
"PO-Revision-Date: 2016-06-28 03:17+0000\n" "PO-Revision-Date: 2016-07-13 17:32+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -51,7 +51,8 @@ msgid "ID"
msgstr "" msgstr ""
#. module: golem_member_skills #. module: golem_member_skills
#: view:golem.member:golem_member_skills.skills_search #: view:golem.member:golem_member_skills.golem_member_skills_search
#: view:res.partner:golem_member_skills.res_partner_skills_search
msgid "Is volunteer" msgid "Is volunteer"
msgstr "" msgstr ""
@ -80,6 +81,11 @@ msgstr ""
msgid "Member skills" msgid "Member skills"
msgstr "" msgstr ""
#. module: golem_member_skills
#: model:ir.model,name:golem_member_skills.model_res_partner
msgid "Partner"
msgstr ""
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member.skill,name:0 #: field:golem.member.skill,name:0
msgid "Skill" msgid "Skill"
@ -87,16 +93,20 @@ msgstr ""
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member,skill_ids:0 #: field:golem.member,skill_ids:0
#: view:res.partner:golem_member_skills.res_partner_skills_form
#: field:res.partner,skill_ids:0
msgid "Skills" msgid "Skills"
msgstr "" msgstr ""
#. module: golem_member_skills #. module: golem_member_skills
#: view:golem.member:golem_member_skills.skills_form #: view:golem.member:golem_member_skills.golem_member_skills_form
#: view:res.partner:golem_member_skills.res_partner_skills_form
msgid "Skills..." msgid "Skills..."
msgstr "" msgstr ""
#. module: golem_member_skills #. module: golem_member_skills
#: field:golem.member,is_volunteer:0 #: field:golem.member,is_volunteer:0
#: field:res.partner,is_volunteer:0
msgid "Volunteer?" msgid "Volunteer?"
msgstr "" msgstr ""

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="res_partner_skills_form">
<field name="name">Add skills as new tab inside notebook</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page name="skills" string="Skills">
<group>
<field name="is_volunteer" />
<field name="skill_ids" widget="many2many_tags"
placeholder="Skills..." />
</group>
</page>
</notebook>
</field>
</record>
<!-- Search -->
<record model="ir.ui.view" id="res_partner_skills_search">
<field name="name">Add Skills Search and Filter</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="arch" type="xml">
<field name="category_id" position="after">
<field name="skill_ids" widget="many2one" />
<filter name="filter_is_volunteer" string="Is volunteer"
domain="[('is_volunteer', '=', True)]" />
</field>
</field>
</record>
</data>
</openerp>