diff --git a/golem_base/__manifest__.py b/golem_base/__manifest__.py index fdb5f3c..de712ae 100644 --- a/golem_base/__manifest__.py +++ b/golem_base/__manifest__.py @@ -18,7 +18,7 @@ { 'name': 'GOLEM base module for global dependencies', 'summary': 'GOLEM base installs base and shared dependencies for GOLEM', - 'version': '10.0.1.0.1', + 'version': '10.0.1.0.2', 'category': 'GOLEM', 'author': 'Fabien Bourgeois', 'license': 'AGPL-3', @@ -31,8 +31,7 @@ 'l10n_fr_siret', 'web_widget_phone_check_fr', 'web_widget_email_check', 'web_widget_url_check', - # 'web_one2many_kanban', - 'web_responsive'], + 'web_responsive', 'backend_theme_v10'], 'data': ['security/golem_security.xml', 'views/menus.xml', 'views/yaltik_base_assets.xml'] diff --git a/golem_resource/__manifest__.py b/golem_resource/__manifest__.py index 155cd46..7d2daa2 100644 --- a/golem_resource/__manifest__.py +++ b/golem_resource/__manifest__.py @@ -20,7 +20,7 @@ 'name': 'GOLEM non-profit resources', 'summary': 'GOLEM resources management', 'description': ''' GOLEM resources management ''', - 'version': '10.0.1.13.0', + 'version': '10.0.1.13.1', 'category': 'GOLEM', 'author': 'Youssef El Ouahby, Fabien Bourgeois', 'license': 'AGPL-3', diff --git a/golem_resource/views/golem_resource_reservation_views.xml b/golem_resource/views/golem_resource_reservation_views.xml index 03f05e3..0aa6677 100644 --- a/golem_resource/views/golem_resource_reservation_views.xml +++ b/golem_resource/views/golem_resource_reservation_views.xml @@ -19,21 +19,6 @@ along with this program. If not, see . - - - GOLEM Resource Reservation Calendar - golem.resource.reservation - - - - - - - - - GOLEM Resource Reservation Tree @@ -105,6 +90,21 @@ along with this program. If not, see . + + + GOLEM Resource Reservation Calendar + golem.resource.reservation + + + + + + + + + GOLEM Resource Reservation Search diff --git a/golem_resource_option/__init__.py b/golem_resource_option/__init__.py new file mode 100644 index 0000000..1fced20 --- /dev/null +++ b/golem_resource_option/__init__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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_resource_option/__manifest__.py b/golem_resource_option/__manifest__.py new file mode 100644 index 0000000..552162a --- /dev/null +++ b/golem_resource_option/__manifest__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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 resources options', + 'summary': 'GOLEM resources options', + 'description': ''' GOLEM resources options management : + - create 1:n options per resource ; + - choose option on reservations ''', + 'version': '10.0.0.1.1', + 'category': 'GOLEM', + 'author': 'Youssef El Ouahby, Fabien Bourgeois', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': ['golem_resource'], + 'data': ['security/ir.model.access.csv', + 'views/golem_resource_views.xml', + 'views/golem_resource_reservation_views.xml', + 'views/golem_resource_option_views.xml'] +} diff --git a/golem_resource_option/i18n/fr.po b/golem_resource_option/i18n/fr.po new file mode 100644 index 0000000..fd5d27c --- /dev/null +++ b/golem_resource_option/i18n/fr.po @@ -0,0 +1,116 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * golem_resource_option +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-29 06:38+0000\n" +"PO-Revision-Date: 2018-03-29 06:38+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_active +msgid "Active" +msgstr "Actif" + +#. module: golem_resource_option +#: code:addons/golem_resource_option/models/golem_resource_option.py:32 +#: sql_constraint:golem.resource.option:0 +#, python-format +msgid "An option has already this name for this resource." +msgstr "Une option porte déjà ce nom pour cette ressource." + +#. module: golem_resource_option +#: model:ir.ui.view,arch_db:golem_resource_option.golem_resource_option_search +msgid "By resource" +msgstr "Par ressource" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_create_date +msgid "Created on" +msgstr "Créé le" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_reservation +msgid "GOLEM Reservation Model" +msgstr "GOLEM Reservation Model" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_option +msgid "GOLEM Reservation Option Model" +msgstr "GOLEM Reservation Option Model" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource +msgid "GOLEM Resource Model" +msgstr "GOLEM Resource Model" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_option_selection +msgid "GOLEM Resource option selection Model" +msgstr "GOLEM Resource option selection Model" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_id +msgid "ID" +msgstr "ID" + +#. module: golem_resource_option +#: model:ir.ui.view,arch_db:golem_resource_option.golem_resource_option_search +msgid "Inactive" +msgstr "Inactif" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option___last_update +msgid "Last Modified on" +msgstr "Dernière Modification le" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_name +msgid "Option" +msgstr "Option" + +#. module: golem_resource_option +#: model:ir.actions.act_window,name:golem_resource_option.golem_resource_option_action +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_ids +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_reservation_resource_option_ids +#: model:ir.ui.menu,name:golem_resource_option.golem_resource_option_menu +msgid "Options" +msgstr "Options" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_resource_id +msgid "Resource" +msgstr "Ressource" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_reservation_selected_option_ids +msgid "Selected options" +msgstr "Options" diff --git a/golem_resource_option/i18n/golem_resource_option.pot b/golem_resource_option/i18n/golem_resource_option.pot new file mode 100644 index 0000000..759e8a6 --- /dev/null +++ b/golem_resource_option/i18n/golem_resource_option.pot @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * golem_resource_option +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-29 06:36+0000\n" +"PO-Revision-Date: 2018-03-29 06:36+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_active +msgid "Active" +msgstr "" + +#. module: golem_resource_option +#: code:addons/golem_resource_option/models/golem_resource_option.py:32 +#: sql_constraint:golem.resource.option:0 +#, python-format +msgid "An option has already this name for this resource." +msgstr "" + +#. module: golem_resource_option +#: model:ir.ui.view,arch_db:golem_resource_option.golem_resource_option_search +msgid "By resource" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_create_uid +msgid "Created by" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_create_date +msgid "Created on" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_display_name +msgid "Display Name" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_reservation +msgid "GOLEM Reservation Model" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_option +msgid "GOLEM Reservation Option Model" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource +msgid "GOLEM Resource Model" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model,name:golem_resource_option.model_golem_resource_option_selection +msgid "GOLEM Resource option selection Model" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_id +msgid "ID" +msgstr "" + +#. module: golem_resource_option +#: model:ir.ui.view,arch_db:golem_resource_option.golem_resource_option_search +msgid "Inactive" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option___last_update +msgid "Last Modified on" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_write_date +msgid "Last Updated on" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_name +msgid "Option" +msgstr "" + +#. module: golem_resource_option +#: model:ir.actions.act_window,name:golem_resource_option.golem_resource_option_action +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_ids +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_reservation_resource_option_ids +#: model:ir.ui.menu,name:golem_resource_option.golem_resource_option_menu +msgid "Options" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_option_resource_id +msgid "Resource" +msgstr "" + +#. module: golem_resource_option +#: model:ir.model.fields,field_description:golem_resource_option.field_golem_resource_reservation_selected_option_ids +msgid "Selected options" +msgstr "" + diff --git a/golem_resource_option/models/__init__.py b/golem_resource_option/models/__init__.py new file mode 100644 index 0000000..6e13137 --- /dev/null +++ b/golem_resource_option/models/__init__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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 golem_resource_option, golem_resource, golem_resource_reservation diff --git a/golem_resource_option/models/golem_resource.py b/golem_resource_option/models/golem_resource.py new file mode 100644 index 0000000..258c0bc --- /dev/null +++ b/golem_resource_option/models/golem_resource.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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 . + +""" GOLEM Resources Option Management """ + +from odoo import models, fields + + +class GolemResource(models.Model): + """ GOLEM Resource Model """ + _inherit = 'golem.resource' + + option_ids = fields.One2many('golem.resource.option', 'resource_id', + string='Options') diff --git a/golem_resource_option/models/golem_resource_option.py b/golem_resource_option/models/golem_resource_option.py new file mode 100644 index 0000000..0790366 --- /dev/null +++ b/golem_resource_option/models/golem_resource_option.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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 . + +""" GOLEM Resource Option """ + + +from odoo import models, fields, _ + + +class GolemResourceOption(models.Model): + """ GOLEM Resource Option Model """ + _name = 'golem.resource.option' + _description = 'GOLEM Reservation Option Model' + _order = 'name asc, resource_id asc' + _sql_constraints = [('golem_resource_option_name_uniq', + 'UNIQUE (name, resource_id)', + _('An option has already this name for this resource.'))] + + name = fields.Char('Option', required=True, index=True) + resource_id = fields.Many2one('golem.resource', 'Resource', + index=True, required=True) + active = fields.Boolean(default=True) diff --git a/golem_resource_option/models/golem_resource_reservation.py b/golem_resource_option/models/golem_resource_reservation.py new file mode 100644 index 0000000..951f649 --- /dev/null +++ b/golem_resource_option/models/golem_resource_reservation.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# 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 . + +""" GOLEM Resource Reservation """ + + +from odoo import models, fields + + +class GolemResourceReservation(models.Model): + """ GOLEM Resource Reservation Option Model """ + _inherit = 'golem.resource.reservation' + + resource_option_ids = fields.One2many(related="resource_id.option_ids") + selected_option_ids = fields.Many2many( + 'golem.resource.option', string='Selected options', + index=True, readonly=True, domain='[("resource_id", "=", resource_id)]', + states={'draft': [('readonly', False)], 'confirmed': [('readonly', False)]}) diff --git a/golem_resource_option/security/ir.model.access.csv b/golem_resource_option/security/ir.model.access.csv new file mode 100644 index 0000000..749b420 --- /dev/null +++ b/golem_resource_option/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_resource_option_user,Access GOLEM Resource Option User,model_golem_resource_option,golem_base.group_golem_user,1,0,0,0 +access_golem_resource_option_manager,Access GOLEM Resource Option Manager,model_golem_resource_option,golem_base.group_golem_manager,1,1,1,1 diff --git a/golem_resource_option/views/golem_resource_option_views.xml b/golem_resource_option/views/golem_resource_option_views.xml new file mode 100644 index 0000000..004411d --- /dev/null +++ b/golem_resource_option/views/golem_resource_option_views.xml @@ -0,0 +1,74 @@ + + + + + + + + GOLEM Resource Option Form + golem.resource.option + +
+ + + + +
+
+
+ + + + GOLEM Resource Option Tree + golem.resource.option + + + + + + + + + + + + GOLEM Resource Option Search + golem.resource.option + + + + + + + + + + + + + + + +
+
diff --git a/golem_resource_option/views/golem_resource_reservation_views.xml b/golem_resource_option/views/golem_resource_reservation_views.xml new file mode 100644 index 0000000..d9602f5 --- /dev/null +++ b/golem_resource_option/views/golem_resource_reservation_views.xml @@ -0,0 +1,38 @@ + + + + + + + + GOLEM Resource Reservation Option Extension Form + golem.resource.reservation + + + + + + + + + + diff --git a/golem_resource_option/views/golem_resource_views.xml b/golem_resource_option/views/golem_resource_views.xml new file mode 100644 index 0000000..e496a2f --- /dev/null +++ b/golem_resource_option/views/golem_resource_views.xml @@ -0,0 +1,37 @@ + + + + + + + + GOLEM Resource Option Extention Form + golem.resource + + + + + + + + + +