Merge branch 'master' into golem_resource_account

This commit is contained in:
eloyoussef 2018-03-19 16:46:59 +01:00
commit aad88c2fed
26 changed files with 813 additions and 327 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2017-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
@ -18,7 +18,7 @@
{
'name': 'GOLEM Activity Member Registrations',
'summary': 'GOLEM Activities Member Registrations management',
'version': '10.0.1.1.0',
'version': '10.0.1.1.3',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',
@ -26,6 +26,8 @@
'installable': True,
'depends': ['golem_activity', 'golem_member'],
'data': ['views/golem_activity_registration_views.xml',
'views/golem_member_views.xml', 'views/golem_activity_views.xml',
'views/golem_member_views.xml',
'views/golem_activity_views.xml',
'report/golem_member_card_templates.xml',
'security/ir.model.access.csv']
}

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-14 23:16+0000\n"
"PO-Revision-Date: 2017-06-28 17:30+0000\n"
"POT-Creation-Date: 2018-03-17 14:18+0000\n"
"PO-Revision-Date: 2018-03-17 14:18+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -17,6 +17,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Activities"
msgstr "Activités"
@ -36,6 +37,11 @@ msgstr "Inscriptions"
msgid "All activities"
msgstr "Toutes les activités"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Animator"
msgstr "Intervenant"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Base price"
@ -71,6 +77,21 @@ msgstr "Activités de la saison affichée par défaut"
msgid "Current season?"
msgstr "Saison en cours?"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Date start"
msgstr "Début"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Date stop"
msgstr "Fin"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Day"
msgstr "Jour"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "Default season"
@ -106,6 +127,16 @@ msgstr "Liste des inscriptions aux activités"
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hour start"
msgstr "Début"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hour stop"
msgstr "Fin"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
@ -137,6 +168,11 @@ msgstr "Adhérent"
msgid "Members"
msgstr "Adhérents"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Name"
msgstr "Nom"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:38
#: sql_constraint:golem.activity:0
@ -186,13 +222,13 @@ msgid "Subscription"
msgstr "Inscription"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:98
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:99
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr "L'inscription n'a pas pu être enregistrée : l'usager visé n'est pas ahdérant pour la même saison que celle pendant laquelle se déroule l'activité."
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:90
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:91
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."
@ -203,3 +239,7 @@ msgstr "L'usager a déjà été inscrit à cette activité."
msgid "Total"
msgstr "Total"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Type"
msgstr "Type"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-09 15:14+0000\n"
"PO-Revision-Date: 2018-01-09 15:14+0000\n"
"POT-Creation-Date: 2018-03-17 14:18+0000\n"
"PO-Revision-Date: 2018-03-17 14:18+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,6 +16,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Activities"
msgstr ""
@ -35,6 +36,11 @@ msgstr ""
msgid "All activities"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Animator"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Base price"
@ -70,6 +76,21 @@ msgstr ""
msgid "Current season?"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Date start"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Date stop"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Day"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "Default season"
@ -105,6 +126,16 @@ msgstr ""
msgid "GOLEM Member"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hour start"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hour stop"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
@ -136,6 +167,11 @@ msgstr ""
msgid "Members"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Name"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:38
#: sql_constraint:golem.activity:0
@ -185,13 +221,13 @@ msgid "Subscription"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:98
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:99
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:90
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:91
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."
@ -202,3 +238,8 @@ msgstr ""
msgid "Total"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Type"
msgstr ""

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<template id="golem_member_card_template_inherit_golem_activity_resgitration"
inherit_id="golem_member.golem_member_card_template">
<xpath expr="//div[@id='page_report_member']/div[1]" postion="after">
<h3>Activities</h3>
<table id="table_activity_ref" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Animator</th>
<th>Day</th>
<th>Hour start</th>
<th>Hour stop</th>
<th>Date start</th>
<th id="activity_inherit_th">Date stop</th>
</tr>
</thead>
<tbody>
<tr id="activity_inherit_price_sum"
t-foreach="member.activity_registration_ids" t-as="reg">
<td class="col-xs-2">
<span t-esc="reg.activity_id.name" />
</td>
<td class="col-xs-2">
<span t-esc="reg.activity_id.type_id.name" />
</td>
<td class="col-xs-2">
<span t-field="reg.activity_id.animator_id" />
</td>
<td class="col-xs-2">
<span t-field="reg.activity_id.weekday" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(reg.activity_id.hour_start), round(reg.activity_id.hour_start % 1 * 60))" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(reg.activity_id.hour_stop), round(reg.activity_id.hour_stop % 1 * 60))" />
</td>
<td class="col-xs-2">
<span t-if="reg.activity_id.is_fullseason" t-field="season.date_start" />
<span t-else="" t-field="reg.activity_id.date_start" />
</td>
<td id="activity_inherit_td">
<span t-if="reg.activity_id.is_fullseason" t-field="season.date_end" />
<span t-else="" t-field="reg.activity_id.date_stop" />
</td>
</tr>
<tr id="activity_inherit_total" />
</tbody>
</table>
</xpath>
</template>
</odoo>

View File

@ -18,7 +18,7 @@
{
'name': 'GOLEM Activity Session Member Registrations States',
'summary': 'GOLEM Activities Session Member Registration states',
'version': '10.0.1.0.0',
'version': '10.0.1.0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
@ -27,6 +27,6 @@
'depends': ['golem_activity_registration', 'golem_payment'],
'data': ['views/golem_activity_registration_views.xml',
'views/golem_member_views.xml', 'views/golem_activity_views.xml',
'wizard/golem_activity_registration_invoicing.xml',
'report/golem_member_report.xml']
'wizard/golem_activity_registration_invoicing.xml']
# 'report/golem_member_report.xml']
}

View File

@ -18,13 +18,13 @@
{
'name': 'GOLEM base module for global dependencies',
'summary': 'GOLEM base installs base and shared dependencies for GOLEM',
'version': '10.0.1.0.0',
'version': '10.0.1.0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['membership', 'contacts', 'mail', 'account_voucher',
'depends': ['report', 'membership', 'contacts', 'mail', 'account_voucher',
'partner_firstname', 'partner_contact_birthdate',
'partner_contact_gender',
'l10n_fr', 'l10n_fr_state', 'l10n_fr_department',
@ -33,5 +33,7 @@
'web_widget_url_check',
# 'web_one2many_kanban',
'web_responsive'],
'data': ['security/golem_security.xml', 'views/menus.xml']
'data': ['security/golem_security.xml',
'views/menus.xml',
'views/yaltik_base_assets.xml']
}

View File

@ -0,0 +1,6 @@
.golem_report_title {
text-align: center;
padding: 0.4em 0 0.4em 0;
border: 1px solid grey;
background-color: #eeeeee;
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<template id="report_assets_common_inherit_golem_base"
inherit_id="report.assets_common">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css"
href="/golem_base/static/src/css/yaltik.css" />
</xpath>
</template>
</odoo>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016-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
@ -18,13 +18,16 @@
{
'name': 'GOLEM families',
'summary': 'GOLEM Members Families',
'version': '10.0.2.1.1',
'version': '10.0.2.2.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['golem_member'],
'data': ['security/ir.model.access.csv', 'views/golem_family_views.xml',
'views/golem_member_views.xml', 'views/res_partner_views.xml']
'data': ['security/ir.model.access.csv',
'views/golem_family_views.xml',
'views/golem_member_views.xml',
'views/res_partner_views.xml',
'report/golem_member_card_templates.xml']
}

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 14:59+0000\n"
"PO-Revision-Date: 2018-01-29 14:59+0000\n"
"POT-Creation-Date: 2018-03-18 09:24+0000\n"
"PO-Revision-Date: 2018-03-18 09:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -26,6 +26,31 @@ msgstr "# de membres"
msgid "0000000000"
msgstr "0000000000"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>Address</strong> :"
msgstr "<strong>Adresse</strong> :"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>Country</strong> :"
msgstr "<strong>Pays</strong> :"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_card_template_inherit_golem_family
msgid "<strong>Family :</strong>"
msgstr "<strong>Famille :</strong>"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_card_template_inherit_golem_family
msgid "<strong>Role :</strong>"
msgstr "<strong>Role :</strong>"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>State</strong> :"
msgstr "<strong>Région</strong> :"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
@ -48,6 +73,7 @@ msgid "City"
msgstr "Ville"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Communication"
@ -71,6 +97,11 @@ msgstr "Nombre"
msgid "Country"
msgstr "Pays"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Country :"
msgstr "Pays :"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_create_uid
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_create_uid
@ -83,6 +114,11 @@ msgstr "Créé par"
msgid "Created on"
msgstr "Créé le"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Details"
msgstr "Détails"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_display_name
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_display_name
@ -107,6 +143,7 @@ msgstr "Familles"
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Family"
@ -159,6 +196,16 @@ msgstr "Liste des rôles familiaux"
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_family
#: model:ir.actions.report.xml,name:golem_family.golem_family_report_html
msgid "Golem family report [HTML]"
msgstr "Cartes adhérents des membres [HTML]"
#. module: golem_family
#: model:ir.actions.report.xml,name:golem_family.golem_family_report_pdf
msgid "Golem family report [PDF]"
msgstr "Cartes adhérents des membres [PDF]"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "Group By"
@ -188,6 +235,11 @@ msgstr "Dernière mise à jour par"
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Mail :"
msgstr "Mail :"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member_ids
@ -204,6 +256,11 @@ msgstr "Adhérents"
msgid "Mobile"
msgstr "Mobile"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Mobile :"
msgstr "Portable :"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_name
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
@ -233,6 +290,11 @@ msgstr "Partenaire"
msgid "Phone"
msgstr "Téléphone"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Phone :"
msgstr "Téléphone :"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Please save new member before assigning a family."
@ -296,6 +358,11 @@ msgstr "Complément de rue"
msgid "Website"
msgstr "Site Web"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Website :"
msgstr "Site Web :"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 09:03+0000\n"
"PO-Revision-Date: 2018-01-29 09:03+0000\n"
"POT-Creation-Date: 2018-03-18 09:23+0000\n"
"PO-Revision-Date: 2018-03-18 09:23+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -26,6 +26,31 @@ msgstr ""
msgid "0000000000"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>Address</strong> :"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>Country</strong> :"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_card_template_inherit_golem_family
msgid "<strong>Family :</strong>"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_card_template_inherit_golem_family
msgid "<strong>Role :</strong>"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "<strong>State</strong> :"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
@ -48,6 +73,7 @@ msgid "City"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Communication"
@ -55,6 +81,9 @@ msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_count
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
msgid "Count"
msgstr ""
@ -80,6 +109,11 @@ msgstr ""
msgid "Created on"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Details"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_display_name
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_display_name
@ -102,26 +136,17 @@ msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_family_search_inherit_golem_membership
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Family"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
msgid "Family Count"
msgstr ""
#. module: golem_family
#: code:addons/golem_family/models/golem_family.py:49
#: code:addons/golem_family/models/golem_family.py:84
#: code:addons/golem_family/models/golem_family.py:48
#: code:addons/golem_family/models/golem_family.py:82
#, python-format
msgid "Family Members"
msgstr ""
@ -133,7 +158,6 @@ msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Family members"
msgstr ""
@ -167,6 +191,16 @@ msgstr ""
msgid "GOLEM Member"
msgstr ""
#. module: golem_family
#: model:ir.actions.report.xml,name:golem_family.golem_family_report_html
msgid "Golem family report [HTML]"
msgstr ""
#. module: golem_family
#: model:ir.actions.report.xml,name:golem_family.golem_family_report_pdf
msgid "Golem family report [PDF]"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "Group By"
@ -196,8 +230,14 @@ msgstr ""
msgid "Last Updated on"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Mail :"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_ids
msgid "Members"
@ -211,6 +251,11 @@ msgstr ""
msgid "Mobile"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Mobile :"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_name
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
@ -240,6 +285,16 @@ msgstr ""
msgid "Phone"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Phone :"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Please save new member before assigning a family."
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Put an internal note..."
@ -298,6 +353,11 @@ msgstr ""
msgid "Website"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_card_template
msgid "Website :"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<report id="golem_family_report_pdf" model="golem.family"
string="Golem family report [PDF]" report_type="qweb-pdf"
name="golem_family.golem_family_card_template"
file="golem_family.golem_family_card_template"
attachment="(object.name + '.pdf')" />
<report id="golem_family_report_html" model="golem.family"
string="Golem family report [HTML]" report_type="qweb-html"
name="golem_family.golem_family_card_template"
file="golem_family.golem_family_card_template"
attachment="(object.name + '.html')" />
<template id="golem_family_card_template">
<t t-call="report.html_container">
<t t-call="report.external_layout">
<div class="page">
<t t-foreach="docs" t-as="o">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-12">
<h2 class="golem_report_title">
Family <span t-field="o.name" />
</h2>
</div>
<div class="col-xs-6">
<h3>Details</h3>
<t if="o.city">
<address>
<strong>Address</strong> :
<span t-field="o.street" /><br />
<t t-if="o.street2">
<span t-field="o.street2" /><br />
</t>
<span t-field="o.zip" />
<span t-field="o.city" /><br />
</address>
</t>
<t t-if="o.state_id">
<strong>State</strong> :
<span t-field="o.state_id" /><br />
</t>
<t t-if="o.country_id">
<strong>Country</strong> :
<span t-field="o.country_id" />
</t>
</div>
<div class="col-xs-6">
<h3>Communication</h3>
<t t-if="o.phone">
Phone : <span t-field="o.phone" /><br />
</t>
<t t-if="o.mobile">
Mobile : <span t-field="o.mobile" /><br />
</t>
<t t-if="o.email">
Mail : <span t-field="o.email" /><br />
</t>
<t t-if="o.website">
Website : <span t-field="o.website" /><br />
</t>
</div>
</div>
</t>
</div>
<t t-foreach="docs" t-as="o">
<t t-foreach="o.member_ids" t-as="i" >
<t t-call="golem_member.golem_member_card_template" >
<t t-set="docs" t-value="i.member_id" />
</t>
</t>
</t>
</t>
</t>
</template>
<template id="golem_member_card_template_inherit_golem_family"
inherit_id="golem_member.golem_member_card_template">
<xpath expr="//div[@id='season_info']" position="before">
<div class="col-xs-12 text-right" id="family_info" t-if="member.family_id">
<strong>Family </strong> <span t-field="member.family_id.name" />
<t t-if="member.family_role">(<em t-field="member.family_role.name" />)</t>
</div>
</xpath>
</template>
</odoo>

View File

@ -19,7 +19,7 @@
{
'name': 'GOLEM non-profit members',
'summary': 'Extends Odoo contacts for MJC',
'version': '10.0.1.1.2',
'version': '10.0.1.1.4',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',
@ -30,7 +30,7 @@
'data': ['views/golem_member_views.xml',
'views/res_partner_views.xml',
'views/golem_member_numberconfig_views.xml',
'views/report_golem_member.xml',
'report/golem_member_card_templates.xml',
'data/golem_member_numberconfig_data.xml',
'security/ir.model.access.csv']
}

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<report id="golem_member_report_pdf" model="golem.member"
string="Golem member report [PDF]" report_type="qweb-pdf"
name="golem_member.golem_member_card_template"
file="golem_member.golem_member_card_template"
attachment="(object.name + '.pdf')" />
<report id="golem_member_report_html" model="golem.member"
string="Golem member report [HTML]" report_type="qweb-html"
name="golem_member.golem_member_card_template"
file="golem_member.golem_member_card_template"
attachment="(object.name + '.html')" />
<template id="golem_member_card_template">
<t t-call="report.html_container">
<t t-set="season" t-value="docs._default_season()" />
<t t-foreach="docs" t-as="member" id="foreach_member">
<t t-call="report.external_layout">
<div id='page_report_member' class="page">
<div class="row">
<div class="col-xs-12" id="member_title">
<h2 class="golem_report_title">
<span t-field="member.name" />
<small>(num. <span t-field="member.number" />)</small>
</h2>
</div>
<div class="col-xs-12" id="season_info">
<h3 class="text-right" style="margin-top: 0;">
Season :
<span t-field="season.name" />
<t t-if="season.date_start">
<small>Period :
<span t-field="season.date_start" /> -
<span t-field="season.date_end" />
</small>
</t>
</h3>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

View File

@ -1,114 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<report id="golem_member_report_pdf" model="golem.member"
string="Golem member report [PDF]" report_type="qweb-pdf"
name="golem_member.golem_member_card_template"
file="golem_member.golem_member_card_template"
attachment="(object.name + '.pdf')" />
<report id="golem_member_report_html" model="golem.member"
string="Golem member report [HTML]" report_type="qweb-html"
name="golem_member.golem_member_card_template"
file="golem_member.golem_member_card_template"
attachment="(object.name + '.html')" />
<template id="golem_member_card_template">
<t t-call="report.html_container">
<t t-set="season" t-value="docs._default_season()" />
<t t-foreach="docs" t-as="member" id="foreach_member">
<t t-call="report.external_layout">
<div id='page_report_member' class="page">
<div class="row">
<div class="col-xs-6">
<h2>
<span t-field="member.name" />
<small>(num. <span t-field="member.number" />)</small>
</h2>
</div>
<div class="col-xs-6">
<h3>
Season :
<span t-field="season.name" />
<t t-if="season.date_start">
<br />
<small>Period :
<span t-field="season.date_start" /> -
<span t-field="season.date_end" />
</small>
</t>
</h3>
</div>
</div>
<h3>Activities</h3>
<table id="table_activity_ref" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Animator</th>
<th>Day</th>
<th>Hour start</th>
<th>Hour stop</th>
<th>Date start</th>
<th id="activity_inherit_th">Date stop</th>
</tr>
</thead>
<tbody>
<tr id="activity_inherit_price_sum"
t-foreach="member.activity_registration_ids" t-as="reg">
<td class="col-xs-2">
<span t-esc="reg.activity_id.name" />
</td>
<td class="col-xs-2">
<span t-esc="reg.activity_id.type_id.name" />
</td>
<td class="col-xs-2">
<span t-field="reg.activity_id.animator_id" />
</td>
<td class="col-xs-2">
<span t-field="reg.activity_id.weekday" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(reg.activity_id.hour_start), round(reg.activity_id.hour_start % 1 * 60))" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(reg.activity_id.hour_stop), round(reg.activity_id.hour_stop % 1 * 60))" />
</td>
<td class="col-xs-2">
<span t-if="reg.activity_id.is_fullseason" t-field="season.date_start" />
<span t-else="" t-field="reg.activity_id.date_start" />
</td>
<td id="activity_inherit_td">
<span t-if="reg.activity_id.is_fullseason" t-field="season.date_end" />
<span t-else="" t-field="reg.activity_id.date_stop" />
</td>
</tr>
<tr id="activity_inherit_total"></tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
</odoo>

View File

@ -18,7 +18,7 @@
{
'name': 'GOLEM non-profit membership handling',
'summary': 'Extends Odoo membership',
'version': '10.0.1.1.1',
'version': '10.0.1.1.2',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',
@ -27,5 +27,5 @@
'depends': ['golem_member', 'account', 'decimal_precision'],
'data': ['views/golem_membership_invoice.xml',
'views/golem_member_view.xml',
'views/report_golem_member.xml']
'report/golem_member_card_template.xml']
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@yaltik.com>
This program is free software: you can redistribute it and/or modify

View File

@ -20,13 +20,13 @@
'name': 'GOLEM non-profit resources',
'summary': 'GOLEM resources management',
'description': ''' GOLEM resources management ''',
'version': '10.0.1.9.1',
'version': '10.0.1.10.0',
'category': 'GOLEM',
'author': 'Youssef El Ouahby, Fabien Bourgeois',
'license': 'AGPL-3',
'application': True,
'installable': True,
'depends': ['product'],
'depends': ['golem_base', 'product'],
'data': ['views/golem_resource_views.xml',
'views/golem_resource_type_views.xml',
'views/golem_resource_reservation_views.xml',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-10 07:13+0000\n"
"PO-Revision-Date: 2018-03-10 07:13+0000\n"
"POT-Creation-Date: 2018-03-17 08:07+0000\n"
"PO-Revision-Date: 2018-03-17 08:07+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -31,6 +31,11 @@ msgstr "Un article générique peut être lié, dans l'objectif de monétiser de
msgid "Active"
msgstr "Actif"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availibility_24
msgid "All day"
msgstr "Toute la journée"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_search
msgid "Archived"
@ -108,26 +113,16 @@ msgstr "Créé par"
msgid "Created on"
msgstr "Créé le"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date
msgid "Date"
msgstr "Date"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_start
msgid "Date start"
msgstr "Date de début"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_stop
msgid "Date stop"
msgstr "Date de fin"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_reservation_view_search
msgid "Day"
msgstr "Jour"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_day_start
msgid "Day start"
msgstr "Jour de début"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_reservation_rejection_wizard_display_name
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_display_name
@ -149,8 +144,7 @@ msgid "End availibility should be after than start availibility"
msgstr "La fin de disponibilité ne peut pas être après le début"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:110
#: code:addons/golem_resource/models/golem_resource_timetable.py:55
#: code:addons/golem_resource/models/golem_resource_timetable.py:70
#, python-format
msgid "End time should be after than start time"
msgstr "L'heure de fin ne peut pas être après l'heure de début"
@ -182,6 +176,11 @@ msgstr "GOLEM Resource Type"
msgid "Golem Timetable"
msgstr "Golem Timetable"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_start
msgid "Hour start"
msgstr "Heure de début"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_reservation_rejection_wizard_id
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_id
@ -253,28 +252,28 @@ msgid "Name"
msgstr "Nom"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:200
#: code:addons/golem_resource/models/golem_resource_reservation.py:222
#, python-format
msgid "Not allowed, the resource is already taken during this period : from {} to {} this day, please choose another périod before confirming."
msgstr "Interdit : la ressource est déjà réservée durant cette période : de {} à {} ce jour, merci de choisir une autre période avant de confirmer."
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:182
#: code:addons/golem_resource/models/golem_resource_reservation.py:201
#, python-format
msgid "Not allowed, the resource is not available during this period, please choose another time before confirming."
msgstr "Interdit : la ressource n'est pas disponible durant cette période, merci de choisir d'autres horaires avant de confirmer à nouveau."
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:167
#: code:addons/golem_resource/models/golem_resource_reservation.py:159
#, python-format
msgid "Not allowed, the resource is not available in this period, please choose another périod before confirming"
msgstr "Interdit : la ressource n'est pas disponible durant cette période, merci de choisir d'autres dates avant de confirmer à nouveau."
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:187
#: code:addons/golem_resource/models/golem_resource_reservation.py:208
#, python-format
msgid "Not allowed, the resource is not available this day. Please choose another date."
msgstr "Interdit : la ressource n'est pas disponible ce jour de la semaine. Merci de choisir un autre jour."
msgid "Not allowed, the resource is not available this day : {}. Please choose another date."
msgstr "Interdit : la ressource n'est pas disponible ce jour : {}. Merci de choisir un autre jour."
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_note
@ -298,7 +297,7 @@ msgid "Partner"
msgstr "Partenaire"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:142
#: code:addons/golem_resource/models/golem_resource_reservation.py:134
#, python-format
msgid "Please enter the rejection reason"
msgstr "Merci de saisir le motif du refus"
@ -378,7 +377,7 @@ msgid "Resource Reservation list"
msgstr "Liste des réservations"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_id_4023
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_id_4449
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_name
msgid "Resource Type"
msgstr "Type de ressource"
@ -419,7 +418,11 @@ msgid "Start"
msgstr "Début"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_start
msgid "Start date"
msgstr "Date de début"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_timetable_view_tree
msgid "Start hour"
msgstr "Heure de début"
@ -436,7 +439,17 @@ msgid "Stop"
msgstr "Fin"
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_stop
msgid "Stop date"
msgstr "Jour de fin"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:102
#, python-format
msgid "Stop date should be after start date"
msgstr "Stop date should be after start date"
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_timetable_view_tree
msgid "Stop hour"
msgstr "Heure de fin"
@ -517,7 +530,7 @@ msgid "Without validation"
msgstr "Sans validation"
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:156
#: code:addons/golem_resource/models/golem_resource_reservation.py:148
#, python-format
msgid "You do not have permissions to validate or reject a reservation."
msgstr "Vous n'avez pas les autorisations nécessaires pour valider ou rejeter une réservation."

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-10 07:12+0000\n"
"PO-Revision-Date: 2018-03-10 07:12+0000\n"
"POT-Creation-Date: 2018-03-17 08:07+0000\n"
"PO-Revision-Date: 2018-03-17 08:07+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -31,6 +31,11 @@ msgstr ""
msgid "Active"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_timetable_availibility_24
msgid "All day"
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_view_search
msgid "Archived"
@ -108,26 +113,16 @@ msgstr ""
msgid "Created on"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date
msgid "Date"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_start
msgid "Date start"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_stop
msgid "Date stop"
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_reservation_view_search
msgid "Day"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_day_start
msgid "Day start"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_reservation_rejection_wizard_display_name
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_display_name
@ -149,8 +144,7 @@ msgid "End availibility should be after than start availibility"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:110
#: code:addons/golem_resource/models/golem_resource_timetable.py:55
#: code:addons/golem_resource/models/golem_resource_timetable.py:70
#, python-format
msgid "End time should be after than start time"
msgstr ""
@ -182,6 +176,11 @@ msgstr ""
msgid "Golem Timetable"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_start
msgid "Hour start"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_reservation_rejection_wizard_id
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_id
@ -253,27 +252,27 @@ msgid "Name"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:200
#: code:addons/golem_resource/models/golem_resource_reservation.py:222
#, python-format
msgid "Not allowed, the resource is already taken during this period : from {} to {} this day, please choose another périod before confirming."
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:182
#: code:addons/golem_resource/models/golem_resource_reservation.py:201
#, python-format
msgid "Not allowed, the resource is not available during this period, please choose another time before confirming."
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:167
#: code:addons/golem_resource/models/golem_resource_reservation.py:159
#, python-format
msgid "Not allowed, the resource is not available in this period, please choose another périod before confirming"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:187
#: code:addons/golem_resource/models/golem_resource_reservation.py:208
#, python-format
msgid "Not allowed, the resource is not available this day. Please choose another date."
msgid "Not allowed, the resource is not available this day : {}. Please choose another date."
msgstr ""
#. module: golem_resource
@ -298,7 +297,7 @@ msgid "Partner"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:142
#: code:addons/golem_resource/models/golem_resource_reservation.py:134
#, python-format
msgid "Please enter the rejection reason"
msgstr ""
@ -378,7 +377,7 @@ msgid "Resource Reservation list"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_id_4023
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_id_4449
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_type_name
msgid "Resource Type"
msgstr ""
@ -419,7 +418,11 @@ msgid "Start"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_start
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_start
msgid "Start date"
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_timetable_view_tree
msgid "Start hour"
msgstr ""
@ -436,7 +439,17 @@ msgid "Stop"
msgstr ""
#. module: golem_resource
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_hour_stop
#: model:ir.model.fields,field_description:golem_resource.field_golem_resource_reservation_date_stop
msgid "Stop date"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:102
#, python-format
msgid "Stop date should be after start date"
msgstr ""
#. module: golem_resource
#: model:ir.ui.view,arch_db:golem_resource.golem_resource_timetable_view_tree
msgid "Stop hour"
msgstr ""
@ -517,7 +530,7 @@ msgid "Without validation"
msgstr ""
#. module: golem_resource
#: code:addons/golem_resource/models/golem_resource_reservation.py:156
#: code:addons/golem_resource/models/golem_resource_reservation.py:148
#, python-format
msgid "You do not have permissions to validate or reject a reservation."
msgstr ""

View File

@ -19,6 +19,7 @@
""" GOLEM Resource Reservation """
from math import modf
from datetime import timedelta
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
@ -28,19 +29,18 @@ class GolemResourceReservation(models.Model):
_name = 'golem.resource.reservation'
_description = 'GOLEM Reservation Model'
_inherit = 'mail.thread'
_order = 'date desc,hour_start asc'
_order = 'day_start desc, hour_start asc'
name = fields.Char(compute='_compute_name', store=True)
# TODO: handle multiple days reservation
date = fields.Date(required=True, index=True, readonly=True,
date_start = fields.Datetime('Start date', required=True,
index=True, readonly=True,
states={'draft': [('readonly', False)]})
hour_start = fields.Float('Start hour', required=True, readonly=True,
date_stop = fields.Datetime('Stop date', required=True,
index=True, readonly=True,
states={'draft': [('readonly', False)]})
hour_stop = fields.Float('Stop hour', required=True, readonly=True,
states={'draft': [('readonly', False)]})
date_start = fields.Datetime(compute='_compute_date_start', store=True, index=True)
date_stop = fields.Datetime(compute='_compute_date_stop', store=True, index=True)
day_start = fields.Date(compute='_compute_day_hour_start', store=True)
hour_start = fields.Float(compute='_compute_day_hour_start', store=True)
resource_id = fields.Many2one('golem.resource', required=True, index=True,
string='Resource', readonly=True,
track_visibility='onchange',
@ -68,46 +68,38 @@ class GolemResourceReservation(models.Model):
rejection_reason = fields.Text(readonly=True, track_visibility='onchange')
@api.depends('resource_id', 'date')
@api.depends('resource_id', 'date_start')
def _compute_name(self):
""" Computes reservation name """
for reservation in self:
reservation.name = u'{}/{}'.format(reservation.resource_id.name,
reservation.date)
reservation.date_start)
@api.depends('date', 'hour_start')
def _compute_date_start(self):
""" Computes Date start """
@api.depends('date_start')
def _compute_day_hour_start(self):
""" Computes Day and Hour Start : for better sorting """
for reservation in self:
minute_start, hour_start = modf(reservation.hour_start)
hour_start = int(hour_start)
minute_start = int(round(minute_start * 60))
reservation.date_start = u'{} {}:{}:00'.format(reservation.date,
hour_start, minute_start)
if reservation.date_start:
date_start = fields.Datetime.from_string(reservation.date_start)
reservation.day_start = date_start.date().isoformat()
reservation.hour_start = date_start.hour + date_start.minute / 60.0
@api.depends('date', 'hour_stop')
def _compute_date_stop(self):
""" Computes Date stop """
for reservation in self:
minute_stop, hour_stop = modf(reservation.hour_stop)
hour_stop = int(hour_stop)
minute_stop = int(round(minute_stop * 60))
reservation.date_stop = u'{} {}:{}:00'.format(reservation.date,
hour_stop, minute_stop)
@api.onchange('hour_start')
def onchange_hour_start(self):
@api.onchange('date_start')
def onchange_date_start(self):
""" Propose automatically stop hour after start hour had been filled """
for reservation in self:
if reservation.hour_start and not reservation.hour_stop:
reservation.hour_stop = reservation.hour_start + 1
if reservation.date_start:
start = fields.Datetime.from_string(reservation.date_start)
duration = timedelta(hours=1)
reservation.date_stop = start + duration
@api.constrains('hour_start', 'hour_stop')
def _check_hour_consistency(self):
""" Checks hour consistency """
@api.constrains('date_start', 'date_stop')
def _check_date_consistency(self):
""" Checks date consistency """
for reservation in self:
if reservation.hour_stop <= reservation.hour_start:
raise ValidationError(_('End time should be after than start time'))
if reservation.date_stop <= reservation.date_start:
raise ValidationError(_('Stop date should be after start date'))
@api.multi
def state_draft(self):
@ -162,8 +154,8 @@ class GolemResourceReservation(models.Model):
for reservation in self:
if reservation.state == 'confirmed':
# Check is reservation is not taking place out of the resource avaibility period
if reservation.date < reservation.resource_id.avaibility_start or \
reservation.date > reservation.resource_id.avaibility_stop:
if reservation.date_start < reservation.resource_id.avaibility_start or \
reservation.date_stop > reservation.resource_id.avaibility_stop:
verr = _('Not allowed, the resource is not available in '
'this period, please choose another périod before '
'confirming')
@ -171,32 +163,62 @@ class GolemResourceReservation(models.Model):
#check if the resource hasn't a total availibility
if not reservation.resource_id.availibility_24_7:
# Check if reservation is not taking place out the avaibility timetables
date_start = fields.Datetime.from_string(reservation.date_start)
date_stop = fields.Datetime.from_string(reservation.date_stop)
reservation_period = [date_start + timedelta(days=x) for x in range(
(date_stop - date_start).days + 1)]
for reservation_day in reservation_period:
is_day_allowed = False
for timetable in reservation.resource_id.timetable_ids:
# Check for the time according to resource timetable avaibility
date = fields.Datetime.from_string(reservation.date)
if int(timetable.weekday) == date.weekday():
#date = fields.Datetime.from_string(reservation_day)
if int(timetable.weekday) == reservation_day.weekday():
is_day_allowed = True
if reservation.hour_start < timetable.time_start or \
reservation.hour_stop > timetable.time_stop:
#only check if the day hasn't a 24 availibility
if not timetable.availibility_24:
reservation_day_date = reservation_day.date()
day_start = date_start.date()
day_stop = date_stop.date()
if reservation_day_date == day_start and \
reservation_day_date == day_stop:
hour_start = date_start.hour + date_start.minute / 60.0
hour_stop = date_stop.hour + date_stop.minute / 60.0
elif reservation_day_date == day_start:
hour_start = date_start.hour + date_start.minute / 60.0
hour_stop = 23.98 # Just before 23:59
elif reservation_day_date == day_stop:
hour_start = 0.0
hour_stop = date_stop.hour + date_stop.minute / 60.0
else:
#if the day is not a start nor stop it
#should be covered on all day
#strange, as availibility_24 is not True
hour_start = 0.0
hour_stop = 23.98
if is_day_allowed and (hour_start < timetable.time_start or \
hour_stop > timetable.time_stop):
verr = _('Not allowed, the resource is not available '
'during this period, please choose another '
'time before confirming.')
raise ValidationError(verr)
if not is_day_allowed:
verr = _('Not allowed, the resource is not available '
'this day. Please choose another date.')
'this day : {}. Please choose another '
'date.'.format(reservation_day.strftime('%A')))
raise ValidationError(verr)
# Check if the resource is already taken during this period
# PERF : check the date, not iterate over all reservations
# PERF : check for res that can be in conflict,
# do not iterate over all reservations
domain = [('resource_id', '=', reservation.resource_id.id),
('date', '=', reservation.date),
('date_start', '<=', reservation.date_stop),
('date_stop', '>=', reservation.date_start),
('state', 'in', ('confirmed', 'validated')),
('id', '!=', reservation.id)]
reservations = self.env['golem.resource.reservation'].search(domain)
for other_res in reservations:
if (other_res.hour_start < reservation.hour_start < other_res.hour_stop) or \
(other_res.hour_start < reservation.hour_stop < other_res.hour_stop):
if (other_res.date_start < reservation.date_start < other_res.date_stop) or \
(other_res.date_start < reservation.date_stop < other_res.date_stop):
verr = _('Not allowed, the resource is already taken '
'during this period : from {} to {} this day, '
'please choose another périod before confirming.')

View File

@ -37,8 +37,16 @@ class GolemTimetable(models.Model):
('4', _('Friday')),
('5', _('Saturday')),
('6', _('Sunday'))], required=True)
time_start = fields.Float(required=True, string='Start')
time_stop = fields.Float(required=True, string='Stop')
time_start = fields.Float(string='Start')
time_stop = fields.Float(string='Stop')
availibility_24 = fields.Boolean(string="All day")
@api.onchange('availibility_24')
def onchange_availibility_24(self):
""" fill time_start et time_stop if availibility_24 is True """
for line in self:
if line.availibility_24:
line.update({'time_start': 0.0, 'time_stop': 23.98})
@api.onchange('time_start')
def onchange_time_start(self):
@ -47,9 +55,23 @@ class GolemTimetable(models.Model):
if line.time_start and not line.time_stop:
line.time_stop = line.time_start + 1
@api.constrains('availibility_24')
def check_avaibility24(self):
""" Checks hour consistency against avaibility 24 """
for line in self:
if line.availibility_24:
line.write({'time_start': 0.0, 'time_stop': 23.98})
@api.constrains('time_start', 'time_stop')
def _check_time_consistency(self):
""" Checks time consistency """
for timetable in self:
if timetable.time_stop <= timetable.time_start:
for line in self:
if line.time_stop <= line.time_start:
raise ValidationError(_('End time should be after than start time'))
@api.constrains('time_start', 'time_stop')
def _check_time_all_day(self):
""" Checks time all day availibility """
for timetable in self:
if timetable.time_stop > 23.98 and timetable.time_start == 0:
timetable.write({'availibility_24': True})

View File

@ -43,9 +43,21 @@ class TestGolemResourceReservation(TransactionCase):
})
self.timetable_obj = self.env['golem.resource.timetable']
timetable_data = {'resource_id': self.resource.id, 'weekday': '0',
'time_start': 8.0, 'time_stop': 12.0}
timetable_data2 = {'resource_id': self.resource.id, 'weekday': '1',
'availibility_24': True}
timetable_data3 = {'resource_id': self.resource.id, 'weekday': '2',
'time_start': 7.0, 'time_stop': 23.98}
timetable_data4 = {'resource_id': self.resource.id, 'weekday': '3',
'availibility_24': True}
self.timetable_obj.create(timetable_data)
self.timetable_obj.create(timetable_data2)
self.timetable_obj.create(timetable_data3)
self.timetable_obj.create(timetable_data4)
timetable_data['resource_id'] = self.resource_val.id
self.timetable_obj.create(timetable_data)
@ -55,9 +67,8 @@ class TestGolemResourceReservation(TransactionCase):
self.data = {
'resource_id': self.resource.id,
'date': '2018-02-05', # is monday
'hour_start': 11.0,
'hour_stop': 12.0,
'date_start': '2018-02-05 11:00:00', # is monday
'date_stop': '2018-02-05 12:00:00',
'partner_id': self.partner.id
}
self.res_obj = self.env['golem.resource.reservation']
@ -67,28 +78,26 @@ class TestGolemResourceReservation(TransactionCase):
reservation = self.res_obj.create(self.data)
self.assertEqual(reservation.partner_id, self.partner)
self.assertEqual(reservation.user_id, self.env.user)
self.assertEqual(reservation.hour_start, 11.0)
self.assertEqual(reservation.hour_stop, 12.0)
self.assertEqual(reservation.state, 'draft')
self.assertFalse(reservation.rejection_reason)
self.assertEqual(reservation.name, 'Resource/2018-02-05')
self.assertEqual(reservation.date_start, '2018-02-05 11:00:00')
self.assertEqual(reservation.date_stop, '2018-02-05 12:00:00')
self.assertEqual(reservation.state, 'draft')
self.assertFalse(reservation.rejection_reason)
self.assertEqual(reservation.name, 'Resource/2018-02-05 11:00:00')
self.assertEqual(reservation.resource_id, self.resource)
self.assertEqual(len(reservation.resource_timetable_ids), 1)
self.assertEqual(len(reservation.resource_timetable_ids), 4)
self.assertEqual(reservation.resource_id.reservation_ids[0], reservation)
def test_reservation_hours(self):
""" Test thats stop hour can not be after or equal start hour """
self.data['hour_stop'] = 7.0
""" Test thats stop date can not be after or equal start date """
self.data['date_stop'] = '2018-02-05 10:00:00'
with self.assertRaises(ValidationError):
self.res_obj.create(self.data)
with self.assertRaises(ValidationError):
self.res_obj.create({
'resource_id': self.resource.id, 'date': '2018-02-05',
'hour_start': 12.0, 'hour_stop': 12.0,
'partner_id': self.partner.id
})
'resource_id': self.resource.id,
'date_start': '2018-02-05 11:00:00',
'date_stop': '2018-02-05 11:00:00',
'partner_id': self.partner.id})
def test_state_basic(self):
""" Tests basic state methods """
@ -114,6 +123,7 @@ class TestGolemResourceReservation(TransactionCase):
reservation.state_confirm()
self.assertEqual(reservation.state, 'validated')
def test_state_rejected(self):
""" Tests state rejected """
self.data['resource_id'] = self.resource_val.id
@ -141,11 +151,11 @@ class TestGolemResourceReservation(TransactionCase):
self.env.user.groups_id = [(2, group_manager.id, False)]
with self.assertRaises(ValidationError) as err:
reservation.state_validated()
self.assertIn(u'autorisations nécessaires pour valider', err.exception.args[0])
self.assertIn(u'do not have permissions to validate', err.exception.args[0])
def test_confirmed_period(self):
""" Test allowed period """
self.data['date'] = '2012-01-01' # Out of period
self.data['date_start'] = '2012-02-05 11:00:00' # Out of period
reservation = self.res_obj.create(self.data)
with self.assertRaises(ValidationError) as err:
reservation.state_confirm()
@ -153,43 +163,61 @@ class TestGolemResourceReservation(TransactionCase):
def test_confirmed_allowed_day(self):
""" Test allowed day """
self.data['date'] = '2018-02-06' # Bad day
self.data['date_start'] = '2018-02-04 11:00:00' # Bad day
reservation = self.res_obj.create(self.data)
with self.assertRaises(ValidationError) as err:
reservation.state_confirm()
self.assertIn('pas disponible ce jour', err.exception.args[0])
self.assertIn('not available this day', err.exception.args[0])
def test_multidays_reservation(self):
""" Test multidays reservation """
#two days allowed reservation
self.data['date_start'] = '2018-02-07 14:00:00' # Wednesday : allowed FROM 7
self.data['date_stop'] = '2018-02-08 11:00:00' # Thursday : allowed
reservation = self.res_obj.create(self.data)
reservation.state_confirm()
self.assertEqual(reservation.state, 'validated')
reservation.state_draft()
#Two days allowed but one not allowed in the middle
reservation.write({'date_start': '2018-02-06 14:00:00',
'date_stop': '2018-02-08 11:00:00'})
with self.assertRaises(ValidationError) as err:
reservation.state_confirm()
self.assertIn('not available during this period', err.exception.args[0])
def test_confirmed_allowed_hours(self):
""" Test allowed hours """
self.data['hour_stop'] = 14.0 # Out of range stop hour
self.data['date_stop'] = '2018-02-05 14:00:00' # Out of range stop hour
reservation = self.res_obj.create(self.data)
with self.assertRaises(ValidationError) as err:
reservation.state_confirm()
self.assertIn(u'merci de choisir d\'autres horaires', err.exception.args[0])
# Out of range start hour
reservation = self.res_obj.create({'resource_id': self.resource.id,
'date': '2018-02-05',
'hour_start': 5.0, # Out of range start hour
'hour_stop': 12.0,
'date_start': '2018-02-05 05:00:00',
'date_stop': '2018-02-05 12:00:00',
'partner_id': self.partner.id})
with self.assertRaises(ValidationError) as err:
reservation.state_confirm()
self.assertIn(u'merci de choisir d\'autres horaires', err.exception.args[0])
self.assertIn(u'the resource is not available during this period', err.exception.args[0])
def test_confirmed_other_res(self):
""" Test if there are other reservations in conflict """
reservation = self.res_obj.create(self.data)
reservation.state_confirm()
reservation2 = self.res_obj.create({
'resource_id': self.resource.id, 'date': '2018-02-05',
'hour_start': 10.0, 'hour_stop': 11.0, # OK, no conflict
'resource_id': self.resource.id,
'date_start': '2018-02-05 10:00:00',
'date_stop': '2018-02-05 11:00:00',
'partner_id': self.partner.id
})
reservation2.state_confirm()
reservation3 = self.res_obj.create({
'resource_id': self.resource.id, 'date': '2018-02-05',
'hour_start': 10.0, 'hour_stop': 10.5, # Conflict with 2nd res
'resource_id': self.resource.id,
'date_start': '2018-02-05 11:20:00',
'date_stop': '2018-02-05 11:40:00',# Conflict with 2nd res
'partner_id': self.partner.id
})
with self.assertRaises(ValidationError) as err:
reservation3.state_confirm()
self.assertIn(u'déjà réservée durant cette période', err.exception.args[0])
self.assertIn(u'the resource is already taken', err.exception.args[0])

View File

@ -46,6 +46,7 @@ class TestGolemResourceTimetable(TransactionCase):
self.assertEqual(timetable.resource_id, self.resource)
self.assertEqual(timetable.time_start, 8.0)
self.assertEqual(timetable.time_stop, 10.0)
self.assertFalse(timetable.availibility_24)
self.assertEqual(timetable, self.resource.timetable_ids[0])
def test_timetable_times(self):

View File

@ -39,9 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="arch" type="xml">
<tree>
<field name="resource_id" />
<field name="date" />
<field name="hour_start" widget="float_time" />
<field name="hour_stop" widget="float_time" />
<field name="date_start" />
<field name="date_stop" />
<field name="partner_id" />
<field name="state" />
</tree>
@ -82,9 +81,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</group>
<group string="Reservation">
<group>
<field name="date" />
<field name="hour_start" widget="float_time" />
<field name="hour_stop" widget="float_time" />
<field name="date_start" />
<field name="date_stop" />
<field name="user_id" options="{'no_create': True}" />
<field name="partner_id" />
<field name="note"

View File

@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_timetable_view_tree">
<field name="name">GOLEM Resource Timetable Tree</field>
@ -27,11 +26,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tree editable="bottom">
<field name="resource_id" invisible="1" />
<field name="weekday" />
<field name="time_start" string="Start hour" widget="float_time" />
<field name="time_stop" string="Stop hour" widget="float_time" />
<field name="availibility_24"/>
<field name="time_start" string="Start hour" widget="float_time"
required="1" />
<field name="time_stop" string="Stop hour" widget="float_time"
required="1" />
</tree>
</field>
</record>
</data>
</odoo>