[IMP]GOLEM Activities Sessions enhancement with type_of field instead of global categories

This commit is contained in:
Fabien Bourgeois 2016-07-15 23:07:24 +02:00
parent 94d8bd0d0f
commit 3ff2549e7e
5 changed files with 187 additions and 74 deletions

View File

@ -20,23 +20,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<!-- Base data for activities --> <!-- Base data for activities -->
<record model="product.category" id="golem_product_category_all_activities">
<field name="name">Toutes les activités</field>
</record>
<record model="product.category" id="golem_product_category_activities"> <record model="product.category" id="golem_product_category_activities">
<field name="name">Activités</field> <field name="name">Activités</field>
<field name="parent_id"
eval="ref('golem_activity.golem_product_category_all_activities')" />
</record> </record>
<record model="product.category" id="golem_product_category_workshops"> <record model="product.category" id="golem_product_category_wellbeing">
<field name="name">Ateliers</field> <field name="name">Bien-Être</field>
<field name="parent_id" <field name="parent_id"
eval="ref('golem_activity.golem_product_category_all_activities')" /> eval="ref('golem_activity.golem_product_category_activities')" />
</record> </record>
<record model="product.category" id="golem_product_category_trainings"> <record model="product.category" id="golem_product_category_martial">
<field name="name">Stages</field> <field name="name">Arts martiaux</field>
<field name="parent_id" <field name="parent_id"
eval="ref('golem_activity.golem_product_category_all_activities')" /> eval="ref('golem_activity.golem_product_category_activities')" />
</record>
<record model="product.category" id="golem_product_category_music">
<field name="name">Musique</field>
<field name="parent_id"
eval="ref('golem_activity.golem_product_category_activities')" />
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-11 10:07+0000\n" "POT-Creation-Date: 2016-07-15 21:03+0000\n"
"PO-Revision-Date: 2016-07-11 10:07+0000\n" "PO-Revision-Date: 2016-07-15 21:03+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -16,10 +16,6 @@ msgstr ""
"Language: fr\n" "Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\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 #. module: golem_activity_session
#: field:golem.activity.session,product_variant_count:0 #: field:golem.activity.session,product_variant_count:0
@ -63,15 +59,14 @@ msgid "Activities sessions"
msgstr "Séances des activités" msgstr "Séances des activités"
#. module: golem_activity_session #. 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 #: field:golem.activity.session,activity_id:0
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Activity" msgid "Activity"
msgstr "Activité" 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 #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:43 #: code:addons/golem_activity_session/models/golem_activity_session.py:43
#, python-format #, python-format
@ -103,15 +98,67 @@ msgstr "Par intervenant"
msgid "By category" msgid "By category"
msgstr "Par catégorie" 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 #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches #: view:golem.activity.session:golem_activity_session.searches
msgid "By weekday" msgid "By weekday"
msgstr "Par jour de la semaine" msgstr "Par jour de la semaine"
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,categ_id:0 #: field:golem.activity.session,rental:0
msgid "Category" msgid "Can be Rent"
msgstr "Catégorie" 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 #. module: golem_activity_session
#: field:golem.activity.session,create_uid:0 #: field:golem.activity.session,create_uid:0
@ -199,7 +246,7 @@ msgid "End date"
msgstr "Date de fin" msgstr "Date de fin"
#. module: golem_activity_session #. 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 #, python-format
msgid "End of the session cannot be after the end of activity date" 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é" 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" msgstr "Abonnés"
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -403,7 +450,7 @@ msgid "Minimum places to maintain the session"
msgstr "Nombre de places minimum pour maintenir la session" msgstr "Nombre de places minimum pour maintenir la session"
#. module: golem_activity_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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -421,19 +468,13 @@ msgid "Net Weight"
msgstr "Net Weight" msgstr "Net Weight"
#. module: golem_activity_session #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form #: code:addons/golem_activity_session/models/golem_activity_session.py:229
#: 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
#, python-format #, python-format
msgid "Number of places cannot be negative." msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif" msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_session #. 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 #, python-format
msgid "Overbooked places cannot be inferior than places" msgid "Overbooked places cannot be inferior than places"
msgstr "Le nombre de places avec surcharge ne peut être inférieur aux 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" msgstr "Prix de vente"
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Saturday" 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." 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 #. 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 #, python-format
msgid "Sorry, there is no more place !" msgid "Sorry, there is no more place !"
msgstr "Désolé mais il n'y a plus de place disponible !" msgstr "Désolé mais il n'y a plus de place disponible !"
@ -598,19 +639,19 @@ msgid "Start date"
msgstr "Date de début" msgstr "Date de début"
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the period cannot be after end of the period." 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" msgstr "Le début de la période ne peut être antérieure à sa fin"
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the session cannot be after end of the session." 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" msgstr "Le début de la séance ne peut être après sa fin"
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the session cannot be before the start of activity date" 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é" 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é" msgstr "Résumé"
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Sunday" 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." 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 #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Thursday" msgid "Thursday"
msgstr "Jeudi" msgstr "Jeudi"
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Tuesday" msgid "Tuesday"
msgstr "Mardi" msgstr "Mardi"
#. module: golem_activity_session
#: field:golem.activity.session,type_of:0
msgid "Type"
msgstr "Type"
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,uom_id:0 #: field:golem.activity.session,uom_id:0
msgid "Unit of Measure" msgid "Unit of Measure"
@ -742,7 +801,7 @@ msgid "Warranty"
msgstr "Garantie" msgstr "Garantie"
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"
@ -758,6 +817,14 @@ msgstr "Jour de la semaine"
msgid "Work in progress" msgid "Work in progress"
msgstr "Travail en cours" 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 #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form #: view:golem.activity.session:golem_activity_session.view_form
msgid "describe the activity characteristics..." msgid "describe the activity characteristics..."

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-11 10:07+0000\n" "POT-Creation-Date: 2016-07-15 21:03+0000\n"
"PO-Revision-Date: 2016-07-11 10:07+0000\n" "PO-Revision-Date: 2016-07-15 21:03+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -15,11 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: golem_activity_session
#: field:golem.activity.session,sales_count:0
msgid "# Sales"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,product_variant_count:0 #: field:golem.activity.session,product_variant_count:0
msgid "# of Product Variants" msgid "# of Product Variants"
@ -62,7 +57,11 @@ msgid "Activities sessions"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: field:golem.activity.session,activity_id:0
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Activity" msgid "Activity"
msgstr "" msgstr ""
@ -97,6 +96,11 @@ msgstr ""
msgid "By category" msgid "By category"
msgstr "" msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By type"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches #: view:golem.activity.session:golem_activity_session.searches
msgid "By weekday" msgid "By weekday"
@ -239,7 +243,7 @@ msgid "End date"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "End of the session cannot be after the end of activity date" msgid "End of the session cannot be after the end of activity date"
msgstr "" msgstr ""
@ -260,7 +264,7 @@ msgid "Followers"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -443,7 +447,7 @@ msgid "Minimum places to maintain the session"
msgstr "" msgstr ""
#. module: golem_activity_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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -461,19 +465,13 @@ msgid "Net Weight"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form #: code:addons/golem_activity_session/models/golem_activity_session.py:229
#: field:golem.activity.session,note:0
msgid "Note"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:215
#, python-format #, python-format
msgid "Number of places cannot be negative." msgid "Number of places cannot be negative."
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "Overbooked places cannot be inferior than places" msgid "Overbooked places cannot be inferior than places"
msgstr "" msgstr ""
@ -569,7 +567,7 @@ msgid "Sale Price"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Saturday" msgid "Saturday"
@ -617,7 +615,7 @@ msgid "Small-sized image of the product. It is automatically resized as a 64x64p
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "Sorry, there is no more place !" msgid "Sorry, there is no more place !"
msgstr "" msgstr ""
@ -638,19 +636,19 @@ msgid "Start date"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the period cannot be after end of the period." msgid "Start of the period cannot be after end of the period."
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the session cannot be after end of the session." msgid "Start of the session cannot be after end of the session."
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #, python-format
msgid "Start of the session cannot be before the start of activity date" msgid "Start of the session cannot be before the start of activity date"
msgstr "" msgstr ""
@ -671,7 +669,7 @@ msgid "Summary"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Sunday" msgid "Sunday"
@ -738,19 +736,37 @@ msgid "This is the average delay in days between the purchase order confirmation
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Tuesday" msgid "Tuesday"
msgstr "" msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,type_of:0
msgid "Type"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,uom_id:0 #: field:golem.activity.session,uom_id:0
msgid "Unit of Measure" msgid "Unit of Measure"
@ -782,7 +798,7 @@ msgid "Warranty"
msgstr "" msgstr ""
#. module: golem_activity_session #. 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 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"
@ -798,6 +814,14 @@ msgstr ""
msgid "Work in progress" msgid "Work in progress"
msgstr "" 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 #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form #: view:golem.activity.session:golem_activity_session.view_form
msgid "describe the activity characteristics..." msgid "describe the activity characteristics..."

View File

@ -90,6 +90,19 @@ class GolemActivitySession(models.Model):
s.session_name = session_name s.session_name = session_name
member_ids = fields.Many2many('golem.member', string='Members') 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') places_used = fields.Integer('Places used', compute='_compute_places_used')
@api.depends('member_ids') @api.depends('member_ids')

View File

@ -48,6 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group> <group>
<field name="activity_id" /> <field name="activity_id" />
<field name="animator_id" /> <field name="animator_id" />
<field name="type_of" />
<field name="places" /> <field name="places" />
<field name="places_min" /> <field name="places_min" />
<field name="is_overbooked" /> <field name="is_overbooked" />
@ -111,8 +112,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
orange: places_remain &lt;= 4;"> orange: places_remain &lt;= 4;">
<field name="is_recurrent" invisible="True" /> <field name="is_recurrent" invisible="True" />
<field name="season_id" /> <field name="season_id" />
<field name="type_of" />
<field name="session_name" /> <field name="session_name" />
<field name="animator_id" />
<field name="weekday" string="Day" <field name="weekday" string="Day"
attrs="{'invisible': [('is_recurrent', '=', False)]}" /> attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="date_start" string="Date" <field name="date_start" string="Date"
@ -120,7 +121,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="places" invisible="True" /> <field name="places" invisible="True" />
<field name="places_remain" string="Remain" /> <field name="places_remain" string="Remain" />
<field name="places_used" invisible="True" /> <field name="places_used" invisible="True" />
<field name="places_min" invislbe="True" /> <field name="places_min" invisible="True" />
<field name="list_price" sum="True" /> <field name="list_price" sum="True" />
</tree> </tree>
</field> </field>
@ -151,7 +152,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="season_id" widget="many2one" /> <field name="season_id" widget="many2one" />
<filter name="season_default" string="Default season" <filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" /> domain="[('is_current', '=', True)]" />
<filter name="type_of_activity" string="Activity"
domain="[('type_of', '=', 'activity')]" />
<filter name="type_of_workshop" string="Workshop"
domain="[('type_of', '=', 'workshop')]" />
<filter name="type_of_training" string="Training"
domain="[('type_of', '=', 'training')]" />
<group string="Group By"> <group string="Group By">
<filter name="group_type_of" string="By type"
context="{'group_by': 'type_of'}" />
<filter name="group_category" string="By category" <filter name="group_category" string="By category"
context="{'group_by': 'categ_id'}"/> context="{'group_by': 'categ_id'}"/>
<filter name="group_weekday" string="By weekday" <filter name="group_weekday" string="By weekday"