diff --git a/golem_member_skills/__init__.py b/golem_member_skills/__init__.py new file mode 100644 index 0000000..8d28962 --- /dev/null +++ b/golem_member_skills/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# 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 . + +from . import golem_member diff --git a/golem_member_skills/__openerp__.py b/golem_member_skills/__openerp__.py new file mode 100644 index 0000000..ca3e90d --- /dev/null +++ b/golem_member_skills/__openerp__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# 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 . + +{ + 'name': 'GOLEM members skills', + 'summary': 'GOLEM non-profit members skills management', + 'description': 'Non-profit french MJC members skills management', + 'version': '0.1', + 'category': 'Non-profit management', + 'author': 'Fabien Bourgeois', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': ['golem_member'], + 'data': ['golem_member_view.xml'] +} diff --git a/golem_member_skills/golem_member.py b/golem_member_skills/golem_member.py new file mode 100644 index 0000000..4379112 --- /dev/null +++ b/golem_member_skills/golem_member.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# 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 . + +from openerp import models, fields + + +class GolemMember(models.Model): + _inherit = 'golem.member' + + skill_ids = fields.Many2many('golem.member.skill', string='Skills') + + +class GolemMemberSkill(models.Model): + _name = 'golem.member.skill' + _description = 'GOLEM Member Skill' + + _sql_constraints = [('golem_member_skill_name_uniq', 'UNIQUE (name)', + 'Member skill must be unique.')] + + name = fields.Char('Skill') diff --git a/golem_member_skills/golem_member_view.xml b/golem_member_skills/golem_member_view.xml new file mode 100644 index 0000000..03b2ef3 --- /dev/null +++ b/golem_member_skills/golem_member_view.xml @@ -0,0 +1,64 @@ + + + + + + + + + Add skills to Others tab + golem.member + + + + + + + + + + Add Skills Group By Filter + golem.member + + + + + + + + + + Member skills + golem.member.skill + + + + + + + + + + +