From 3ff2549e7efc1082fb08abd013970238c0b596ff Mon Sep 17 00:00:00 2001 From: Fabien Bourgeois Date: Fri, 15 Jul 2016 23:07:24 +0200 Subject: [PATCH] [IMP]GOLEM Activities Sessions enhancement with type_of field instead of global categories --- golem_activity/data/golem_activity_data.xml | 22 +-- golem_activity_session/i18n/fr.po | 135 +++++++++++++----- .../i18n/golem_activity_session.pot | 78 ++++++---- .../models/golem_activity_session.py | 13 ++ .../views/golem_activity_view.xml | 13 +- 5 files changed, 187 insertions(+), 74 deletions(-) diff --git a/golem_activity/data/golem_activity_data.xml b/golem_activity/data/golem_activity_data.xml index c03af03..5cd4a3b 100644 --- a/golem_activity/data/golem_activity_data.xml +++ b/golem_activity/data/golem_activity_data.xml @@ -20,23 +20,23 @@ along with this program. If not, see . - - Toutes les activités - Activités - - - Ateliers + + Bien-Être + eval="ref('golem_activity.golem_product_category_activities')" /> - - Stages + + Arts martiaux + eval="ref('golem_activity.golem_product_category_activities')" /> + + + Musique + diff --git a/golem_activity_session/i18n/fr.po b/golem_activity_session/i18n/fr.po index 7d2a713..5d04522 100644 --- a/golem_activity_session/i18n/fr.po +++ b/golem_activity_session/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-11 10:07+0000\n" -"PO-Revision-Date: 2016-07-11 10:07+0000\n" +"POT-Creation-Date: 2016-07-15 21:03+0000\n" +"PO-Revision-Date: 2016-07-15 21:03+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,10 +16,6 @@ msgstr "" "Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: golem_activity_session -#: field:golem.activity.session,sales_count:0 -msgid "# Sales" -msgstr "# Ventes" #. module: golem_activity_session #: field:golem.activity.session,product_variant_count:0 @@ -63,15 +59,14 @@ msgid "Activities sessions" msgstr "Séances des activités" #. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:93 +#: view:golem.activity.session:golem_activity_session.searches #: field:golem.activity.session,activity_id:0 +#: selection:golem.activity.session,type_of:0 +#, python-format msgid "Activity" msgstr "Activité" -#. module: golem_activity_session -#: view:golem.activity.session:golem_activity_session.view_form -msgid "Activity Session" -msgstr "Séance" - #. module: golem_activity_session #: code:addons/golem_activity_session/models/golem_activity_session.py:43 #, python-format @@ -103,15 +98,67 @@ msgstr "Par intervenant" msgid "By category" msgstr "Par catégorie" +#. module: golem_activity_session +#: view:golem.activity.session:golem_activity_session.searches +msgid "By type" +msgstr "Par type" + #. module: golem_activity_session #: view:golem.activity.session:golem_activity_session.searches msgid "By weekday" msgstr "Par jour de la semaine" #. module: golem_activity_session -#: field:golem.activity.session,categ_id:0 -msgid "Category" -msgstr "Catégorie" +#: field:golem.activity.session,rental:0 +msgid "Can be Rent" +msgstr "Peut être loué" + +#. module: golem_activity_session +#: field:golem.activity.session,sale_ok:0 +msgid "Can be Sold" +msgstr "Peut être vendu" + +#. module: golem_activity_session +#: model:ir.ui.menu,name:golem_activity_session.activity_categ +msgid "Categories" +msgstr "Categories" + +#. module: golem_activity_session +#: help:golem.activity.session,membership:0 +msgid "Check if the product is eligible for membership." +msgstr "Check if the product is eligible for membership." + +#. module: golem_activity_session +#: help:golem.activity.session,uos_coeff:0 +msgid "Coefficient to convert default Unit of Measure to Unit of Sale\n" +" uos = uom * coeff" +msgstr "Coefficient to convert default Unit of Measure to Unit of Sale\n" +" uos = uom * coeff" + +#. module: golem_activity_session +#: field:golem.activity.session,color:0 +msgid "Color Index" +msgstr "Color Index" + +#. module: golem_activity_session +#: field:golem.activity.session,company_id:0 +msgid "Company" +msgstr "Company" + +#. module: golem_activity_session +#: help:golem.activity.session,type:0 +msgid "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual." +msgstr "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual." + +#. module: golem_activity_session +#: field:golem.activity.session,standard_price:0 +msgid "Cost Price" +msgstr "Cost Price" + +#. module: golem_activity_session +#: help:golem.activity.session,standard_price:0 +msgid "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product." +msgstr "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product." #. module: golem_activity_session #: field:golem.activity.session,create_uid:0 @@ -199,7 +246,7 @@ msgid "End date" msgstr "Date de fin" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:147 +#: code:addons/golem_activity_session/models/golem_activity_session.py:161 #, python-format msgid "End of the session cannot be after the end of activity date" msgstr "La fin de la séance ne peut être après la fin de l'activité" @@ -220,7 +267,7 @@ msgid "Followers" msgstr "Abonnés" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:155 +#: code:addons/golem_activity_session/models/golem_activity_session.py:169 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Friday" @@ -403,7 +450,7 @@ msgid "Minimum places to maintain the session" msgstr "Nombre de places minimum pour maintenir la session" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:151 +#: code:addons/golem_activity_session/models/golem_activity_session.py:165 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Monday" @@ -421,19 +468,13 @@ msgid "Net Weight" msgstr "Net Weight" #. module: golem_activity_session -#: view:golem.activity.session:golem_activity_session.view_form -#: field:golem.activity.session,note:0 -msgid "Note" -msgstr "Note" - -#. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:215 +#: code:addons/golem_activity_session/models/golem_activity_session.py:229 #, python-format msgid "Number of places cannot be negative." msgstr "Le nombre de places ne peut pas être négatif" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:218 +#: code:addons/golem_activity_session/models/golem_activity_session.py:232 #, python-format msgid "Overbooked places cannot be inferior than places" msgstr "Le nombre de places avec surcharge ne peut être inférieur aux places" @@ -529,7 +570,7 @@ msgid "Sale Price" msgstr "Prix de vente" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:156 +#: code:addons/golem_activity_session/models/golem_activity_session.py:170 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Saturday" @@ -577,7 +618,7 @@ msgid "Small-sized image of the product. It is automatically resized as a 64x64p msgstr "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required." #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:198 +#: code:addons/golem_activity_session/models/golem_activity_session.py:212 #, python-format msgid "Sorry, there is no more place !" msgstr "Désolé mais il n'y a plus de place disponible !" @@ -598,19 +639,19 @@ msgid "Start date" msgstr "Date de début" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:173 +#: code:addons/golem_activity_session/models/golem_activity_session.py:187 #, python-format msgid "Start of the period cannot be after end of the period." msgstr "Le début de la période ne peut être antérieure à sa fin" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:139 +#: code:addons/golem_activity_session/models/golem_activity_session.py:153 #, python-format msgid "Start of the session cannot be after end of the session." msgstr "Le début de la séance ne peut être après sa fin" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:143 +#: code:addons/golem_activity_session/models/golem_activity_session.py:157 #, python-format msgid "Start of the session cannot be before the start of activity date" msgstr "Le début de la séance ne peut être fixé avant le début de l'activité" @@ -631,7 +672,7 @@ msgid "Summary" msgstr "Résumé" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:157 +#: code:addons/golem_activity_session/models/golem_activity_session.py:171 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Sunday" @@ -698,19 +739,37 @@ msgid "This is the average delay in days between the purchase order confirmation msgstr "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays." #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:154 +#: code:addons/golem_activity_session/models/golem_activity_session.py:168 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Thursday" msgstr "Jeudi" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:152 +#: code:addons/golem_activity_session/models/golem_activity_session.py:95 +#: view:golem.activity.session:golem_activity_session.searches +#: selection:golem.activity.session,type_of:0 +#, python-format +msgid "Training" +msgstr "Stage" + +#. module: golem_activity_session +#: view:golem.activity.session:golem_activity_session.session_tree +msgid "True" +msgstr "Vrai" + +#. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:166 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Tuesday" msgstr "Mardi" +#. module: golem_activity_session +#: field:golem.activity.session,type_of:0 +msgid "Type" +msgstr "Type" + #. module: golem_activity_session #: field:golem.activity.session,uom_id:0 msgid "Unit of Measure" @@ -742,7 +801,7 @@ msgid "Warranty" msgstr "Garantie" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:153 +#: code:addons/golem_activity_session/models/golem_activity_session.py:167 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Wednesday" @@ -758,6 +817,14 @@ msgstr "Jour de la semaine" msgid "Work in progress" msgstr "Travail en cours" +#. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:94 +#: view:golem.activity.session:golem_activity_session.searches +#: selection:golem.activity.session,type_of:0 +#, python-format +msgid "Workshop" +msgstr "Atelier" + #. module: golem_activity_session #: view:golem.activity.session:golem_activity_session.view_form msgid "describe the activity characteristics..." diff --git a/golem_activity_session/i18n/golem_activity_session.pot b/golem_activity_session/i18n/golem_activity_session.pot index e42bb2b..72c3e3e 100644 --- a/golem_activity_session/i18n/golem_activity_session.pot +++ b/golem_activity_session/i18n/golem_activity_session.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-11 10:07+0000\n" -"PO-Revision-Date: 2016-07-11 10:07+0000\n" +"POT-Creation-Date: 2016-07-15 21:03+0000\n" +"PO-Revision-Date: 2016-07-15 21:03+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,11 +15,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: golem_activity_session -#: field:golem.activity.session,sales_count:0 -msgid "# Sales" -msgstr "" - #. module: golem_activity_session #: field:golem.activity.session,product_variant_count:0 msgid "# of Product Variants" @@ -62,7 +57,11 @@ msgid "Activities sessions" msgstr "" #. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:93 +#: view:golem.activity.session:golem_activity_session.searches #: field:golem.activity.session,activity_id:0 +#: selection:golem.activity.session,type_of:0 +#, python-format msgid "Activity" msgstr "" @@ -97,6 +96,11 @@ msgstr "" msgid "By category" msgstr "" +#. module: golem_activity_session +#: view:golem.activity.session:golem_activity_session.searches +msgid "By type" +msgstr "" + #. module: golem_activity_session #: view:golem.activity.session:golem_activity_session.searches msgid "By weekday" @@ -239,7 +243,7 @@ msgid "End date" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:147 +#: code:addons/golem_activity_session/models/golem_activity_session.py:161 #, python-format msgid "End of the session cannot be after the end of activity date" msgstr "" @@ -260,7 +264,7 @@ msgid "Followers" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:155 +#: code:addons/golem_activity_session/models/golem_activity_session.py:169 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Friday" @@ -443,7 +447,7 @@ msgid "Minimum places to maintain the session" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:151 +#: code:addons/golem_activity_session/models/golem_activity_session.py:165 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Monday" @@ -461,19 +465,13 @@ msgid "Net Weight" msgstr "" #. module: golem_activity_session -#: view:golem.activity.session:golem_activity_session.view_form -#: field:golem.activity.session,note:0 -msgid "Note" -msgstr "" - -#. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:215 +#: code:addons/golem_activity_session/models/golem_activity_session.py:229 #, python-format msgid "Number of places cannot be negative." msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:218 +#: code:addons/golem_activity_session/models/golem_activity_session.py:232 #, python-format msgid "Overbooked places cannot be inferior than places" msgstr "" @@ -569,7 +567,7 @@ msgid "Sale Price" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:156 +#: code:addons/golem_activity_session/models/golem_activity_session.py:170 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Saturday" @@ -617,7 +615,7 @@ msgid "Small-sized image of the product. It is automatically resized as a 64x64p msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:198 +#: code:addons/golem_activity_session/models/golem_activity_session.py:212 #, python-format msgid "Sorry, there is no more place !" msgstr "" @@ -638,19 +636,19 @@ msgid "Start date" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:173 +#: code:addons/golem_activity_session/models/golem_activity_session.py:187 #, python-format msgid "Start of the period cannot be after end of the period." msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:139 +#: code:addons/golem_activity_session/models/golem_activity_session.py:153 #, python-format msgid "Start of the session cannot be after end of the session." msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:143 +#: code:addons/golem_activity_session/models/golem_activity_session.py:157 #, python-format msgid "Start of the session cannot be before the start of activity date" msgstr "" @@ -671,7 +669,7 @@ msgid "Summary" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:157 +#: code:addons/golem_activity_session/models/golem_activity_session.py:171 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Sunday" @@ -738,19 +736,37 @@ msgid "This is the average delay in days between the purchase order confirmation msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:154 +#: code:addons/golem_activity_session/models/golem_activity_session.py:168 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Thursday" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:152 +#: code:addons/golem_activity_session/models/golem_activity_session.py:95 +#: view:golem.activity.session:golem_activity_session.searches +#: selection:golem.activity.session,type_of:0 +#, python-format +msgid "Training" +msgstr "" + +#. module: golem_activity_session +#: view:golem.activity.session:golem_activity_session.session_tree +msgid "True" +msgstr "" + +#. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:166 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Tuesday" msgstr "" +#. module: golem_activity_session +#: field:golem.activity.session,type_of:0 +msgid "Type" +msgstr "" + #. module: golem_activity_session #: field:golem.activity.session,uom_id:0 msgid "Unit of Measure" @@ -782,7 +798,7 @@ msgid "Warranty" msgstr "" #. module: golem_activity_session -#: code:addons/golem_activity_session/models/golem_activity_session.py:153 +#: code:addons/golem_activity_session/models/golem_activity_session.py:167 #: selection:golem.activity.session,weekday:0 #, python-format msgid "Wednesday" @@ -798,6 +814,14 @@ msgstr "" msgid "Work in progress" msgstr "" +#. module: golem_activity_session +#: code:addons/golem_activity_session/models/golem_activity_session.py:94 +#: view:golem.activity.session:golem_activity_session.searches +#: selection:golem.activity.session,type_of:0 +#, python-format +msgid "Workshop" +msgstr "" + #. module: golem_activity_session #: view:golem.activity.session:golem_activity_session.view_form msgid "describe the activity characteristics..." diff --git a/golem_activity_session/models/golem_activity_session.py b/golem_activity_session/models/golem_activity_session.py index 233eeb1..3ec31f0 100644 --- a/golem_activity_session/models/golem_activity_session.py +++ b/golem_activity_session/models/golem_activity_session.py @@ -90,6 +90,19 @@ class GolemActivitySession(models.Model): s.session_name = session_name member_ids = fields.Many2many('golem.member', string='Members') + type_of = fields.Selection([('activity', _('Activity')), + ('workshop', _('Workshop')), + ('training', _('Training'))], + default='activity', index=True, string='Type') + + @api.onchange('type_of') + def onchange_type_of(self): + for s in self: + if s.type_of != 'activity': + s.is_recurrent = False + else: + s.is_recurrent = True + places_used = fields.Integer('Places used', compute='_compute_places_used') @api.depends('member_ids') diff --git a/golem_activity_session/views/golem_activity_view.xml b/golem_activity_session/views/golem_activity_view.xml index 9479de8..99c80f8 100644 --- a/golem_activity_session/views/golem_activity_view.xml +++ b/golem_activity_session/views/golem_activity_view.xml @@ -48,6 +48,7 @@ along with this program. If not, see . + @@ -111,8 +112,8 @@ along with this program. If not, see . orange: places_remain <= 4;"> + - . - + @@ -151,7 +152,15 @@ along with this program. If not, see . + + + +