From cc23e92232861a6002232fee46ca0a4dc790bda2 Mon Sep 17 00:00:00 2001 From: eloyoussef Date: Thu, 15 Feb 2018 14:16:51 +0100 Subject: [PATCH] 1er version du golem_activity_queue --- golem_activity_queue/__init__.py | 18 +++++++++ golem_activity_queue/__manifest__.py | 29 ++++++++++++++ golem_activity_queue/models/__init__.py | 18 +++++++++ .../models/golem_activity_queue.py | 38 +++++++++++++++++++ .../security/ir.model.access.csv | 3 ++ 5 files changed, 106 insertions(+) create mode 100644 golem_activity_queue/__init__.py create mode 100644 golem_activity_queue/__manifest__.py create mode 100644 golem_activity_queue/models/__init__.py create mode 100644 golem_activity_queue/models/golem_activity_queue.py create mode 100644 golem_activity_queue/security/ir.model.access.csv diff --git a/golem_activity_queue/__init__.py b/golem_activity_queue/__init__.py new file mode 100644 index 0000000..feff6f0 --- /dev/null +++ b/golem_activity_queue/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 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 models diff --git a/golem_activity_queue/__manifest__.py b/golem_activity_queue/__manifest__.py new file mode 100644 index 0000000..128de52 --- /dev/null +++ b/golem_activity_queue/__manifest__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 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 activities queue', + 'summary': 'GOLEM activities queue', + 'version': '10.0.2.1.0', + 'category': 'GOLEM', + 'author': 'Youssef Elouahby', + 'license': 'AGPL-3', + 'application': True, + 'installable': True, + 'depends': ['golem_activity', 'golem_activity_registration'], + 'data': ['views/golem_activity_queue_views.xml'] +} diff --git a/golem_activity_queue/models/__init__.py b/golem_activity_queue/models/__init__.py new file mode 100644 index 0000000..0ff98f0 --- /dev/null +++ b/golem_activity_queue/models/__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_activity_queue diff --git a/golem_activity_queue/models/golem_activity_queue.py b/golem_activity_queue/models/golem_activity_queue.py new file mode 100644 index 0000000..5871b0d --- /dev/null +++ b/golem_activity_queue/models/golem_activity_queue.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# Copyright 2017 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 . + +""" GOLEM activities related models """ + +from odoo import models, fields, api, _ + +class GolemActivity(models.Model): + """ GOLEM Activity """ + _name = 'golem.activity' + + #ajout d'un champs O2M vers activity_id + activity_queue_id = fields.One2many('golem.activity.queue', 'activity_id') + # un boolen pour determiner si une fille d'attente est autorisé + allows_queue = fields.Boolean(required=False) + +class GolemActivityQueue(models.Model): + """ GOLEM Activity Queue """ + _name = 'golem.activity.queue' + _description = 'GOLEM Activity Queue' + + activity_id = fields.Many2one('golem.activity', required=True) + season_id = fields.Many2one('golem.season', related='golem.activity.season_id') + member_id = fields.Many2one('golem.member', required=True) diff --git a/golem_activity_queue/security/ir.model.access.csv b/golem_activity_queue/security/ir.model.access.csv new file mode 100644 index 0000000..2bcb93b --- /dev/null +++ b/golem_activity_queue/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_golem_activity_queue_user,Access GOLEM Activity Queue User,model_golem_activity_queue,golem_base.group_golem_user,1,1,1,0 +access_golem_activity_queue_manager,Access GOLEM Activity Queue Manager,model_golem_activity_queue,golem_base.group_golem_manager,1,1,1,1