Merge branch 'master' into golem_resource_pack

This commit is contained in:
eloyoussef 2018-03-29 17:07:47 +02:00
commit e738473b53
15 changed files with 576 additions and 19 deletions

View File

@ -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']

View File

@ -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',

View File

@ -19,21 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!-- Calendars -->
<record model="ir.ui.view" id="golem_resource_reservation_view_calendar">
<field name="name">GOLEM Resource Reservation Calendar</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_stop="date_stop" color="resource_id"
event_open_popup="%(golem_resource.golem_resource_reservation_view_form)s"
mode="month">
<field name="resource_id" />
<field name="partner_id" />
<field name="note" />
</calendar>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_reservation_view_tree">
<field name="name">GOLEM Resource Reservation Tree</field>
@ -105,6 +90,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Calendars -->
<record model="ir.ui.view" id="golem_resource_reservation_view_calendar">
<field name="name">GOLEM Resource Reservation Calendar</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_stop="date_stop" color="resource_id"
event_open_popup="%(golem_resource.golem_resource_reservation_view_form)s"
mode="month">
<field name="resource_id" />
<field name="partner_id" />
<field name="note" />
</calendar>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_resource_reservation_view_search">
<field name="name">GOLEM Resource Reservation Search</field>

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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,36 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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 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']
}

View File

@ -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"

View File

@ -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 ""

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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 golem_resource_option, golem_resource, golem_resource_reservation

View File

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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/>.
""" 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')

View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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/>.
""" 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)

View File

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# 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/>.
""" 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)]})

View File

@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_resource_option_user Access GOLEM Resource Option User model_golem_resource_option golem_base.group_golem_user 1 0 0 0
3 access_golem_resource_option_manager Access GOLEM Resource Option Manager model_golem_resource_option golem_base.group_golem_manager 1 1 1 1

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record model="ir.ui.view" id="golem_resource_option_form">
<field name="name">GOLEM Resource Option Form</field>
<field name="model">golem.resource.option</field>
<field name="arch" type="xml">
<form>
<group>
<field name="name" />
<field name="resource_id" invisible="1" />
</group>
</form>
</field>
</record>
<!-- Tree -->
<record model="ir.ui.view" id="golem_resource_option_tree">
<field name="name">GOLEM Resource Option Tree</field>
<field name="model">golem.resource.option</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="resource_id" options="{'no_create': True}" />
<field name="active" />
</tree>
</field>
</record>
<!-- Search -->
<record model="ir.ui.view" id="golem_resource_option_search">
<field name="name">GOLEM Resource Option Search</field>
<field name="model">golem.resource.option</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field name="resource_id" />
<filter name="inactive" string="Inactive"
domain="[('active', '=', False)]" />
<filter name="group_resource" string="By resource"
context="{'group_by': 'resource_id'}" />
</search>
</field>
</record>
<!-- Action -->
<act_window id="golem_resource_option_action" name="Options"
res_model="golem.resource.option" view_mode="tree" />
<!-- Menu -->
<menuitem id="golem_resource_option_menu" name="Options"
parent="golem_resource.resource_configuration_menu"
action="golem_resource_option_action" sequence="15" />
</data>
</odoo>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
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/>.
-->
<odoo>
<data>
<!-- Forms -->
<record model="ir.ui.view"
id="golem_resource_reservation_view_form_inherit_golem_resource_option">
<field name="name">GOLEM Resource Reservation Option Extension Form</field>
<field name="model">golem.resource.reservation</field>
<field name="inherit_id" ref="golem_resource.golem_resource_reservation_view_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after" >
<field name="selected_option_ids"
context="{'default_reservation_id': active_id}"
widget="many2many_checkboxes" />
</field>
</field>
</record>
</data>
</odoo>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
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/>.
-->
<odoo>
<data>
<!-- Forms -->
<record model="ir.ui.view" id="golem_resource_inherit_option_form">
<field name="name">GOLEM Resource Option Extention Form</field>
<field name="model">golem.resource</field>
<field name="inherit_id" ref="golem_resource.golem_resource_view_form"/>
<field name="arch" type="xml">
<field name="product_tmpl_id" position="after">
<field name="option_ids" widget="many2many_tags"
domain="[('resource_id', '=', active_id)]"
context="{'default_resource_id': active_id}" />
</field>
</field>
</record>
</data>
</odoo>