1er version du golem_activity_queue

This commit is contained in:
eloyoussef 2018-02-15 14:16:51 +01:00
parent 211a44ab4e
commit cc23e92232
5 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2018 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/>.
from . import models

View File

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright 2018 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/>.
{
'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']
}

View File

@ -0,0 +1,18 @@
# -*- coding: 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/>.
from . import golem_activity_queue

View File

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# Copyright 2017 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/>.
""" 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)

View File

@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_activity_queue_user Access GOLEM Activity Queue User model_golem_activity_queue golem_base.group_golem_user 1 1 1 0
3 access_golem_activity_queue_manager Access GOLEM Activity Queue Manager model_golem_activity_queue golem_base.group_golem_manager 1 1 1 1