[IMP]GOLEM Activity Sessions : add current season in search and per default for views

This commit is contained in:
Fabien Bourgeois 2016-07-11 07:31:17 +02:00
parent 27e37cb667
commit 9044421823
5 changed files with 75 additions and 35 deletions

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-10 06:15+0000\n" "POT-Creation-Date: 2016-07-11 05:29+0000\n"
"PO-Revision-Date: 2016-07-10 06:15+0000\n" "PO-Revision-Date: 2016-07-11 05:29+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -78,6 +78,11 @@ msgstr "Créé par"
msgid "Created on" msgid "Created on"
msgstr "Créé le" msgstr "Créé le"
#. module: golem_activity_session
#: field:golem.activity.session,is_current:0
msgid "Current season?"
msgstr "Saison en cours?"
#. module: golem_activity_session #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree #: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date" msgid "Date"
@ -88,6 +93,11 @@ msgstr "Date"
msgid "Day" msgid "Day"
msgstr "Jour" msgstr "Jour"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Default season"
msgstr "Saison par défaut"
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,display_name:0 #: field:golem.activity.session,display_name:0
msgid "Display Name" msgid "Display Name"
@ -99,7 +109,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:111 #: code:addons/golem_activity_session/models/golem_activity_session.py:115
#, 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é"
@ -110,7 +120,7 @@ msgid "End time"
msgstr "Heure de fin" msgstr "Heure de fin"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:119 #: code:addons/golem_activity_session/models/golem_activity_session.py:123
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -193,7 +203,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:115 #: code:addons/golem_activity_session/models/golem_activity_session.py:119
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -211,13 +221,13 @@ msgid "Note"
msgstr "Note" msgstr "Note"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:179 #: code:addons/golem_activity_session/models/golem_activity_session.py:183
#, 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:182 #: code:addons/golem_activity_session/models/golem_activity_session.py:186
#, 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"
@ -248,12 +258,17 @@ msgid "Remaining places"
msgstr "Places restantes" msgstr "Places restantes"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:120 #: code:addons/golem_activity_session/models/golem_activity_session.py:124
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Saturday" msgid "Saturday"
msgstr "Samedi" msgstr "Samedi"
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr "Saison"
#. module: golem_activity_session #. module: golem_activity_session
#: help:golem.activity.session,categ_id:0 #: help:golem.activity.session,categ_id:0
msgid "Select category for the current product" msgid "Select category for the current product"
@ -266,7 +281,7 @@ msgid "Sessions"
msgstr "Séances" msgstr "Séances"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:162 #: code:addons/golem_activity_session/models/golem_activity_session.py:166
#, 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 !"
@ -277,19 +292,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:137 #: code:addons/golem_activity_session/models/golem_activity_session.py:141
#, 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 postérieur à la fin." msgstr "Le début de la période ne peut être postérieur à la fin."
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:103 #: code:addons/golem_activity_session/models/golem_activity_session.py:107
#, 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:107 #: code:addons/golem_activity_session/models/golem_activity_session.py:111
#, 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é"
@ -300,28 +315,28 @@ msgid "Start time"
msgstr "Heure de début" msgstr "Heure de début"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:121 #: code:addons/golem_activity_session/models/golem_activity_session.py:125
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Sunday" msgid "Sunday"
msgstr "Dimanche" msgstr "Dimanche"
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:118 #: code:addons/golem_activity_session/models/golem_activity_session.py:122
#: 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:116 #: code:addons/golem_activity_session/models/golem_activity_session.py:120
#: 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 #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:117 #: code:addons/golem_activity_session/models/golem_activity_session.py:121
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"

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-10 06:15+0000\n" "POT-Creation-Date: 2016-07-11 05:28+0000\n"
"PO-Revision-Date: 2016-07-10 06:15+0000\n" "PO-Revision-Date: 2016-07-11 05:28+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -77,6 +77,11 @@ msgstr ""
msgid "Created on" msgid "Created on"
msgstr "" msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_current:0
msgid "Current season?"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree #: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date" msgid "Date"
@ -87,6 +92,11 @@ msgstr ""
msgid "Day" msgid "Day"
msgstr "" msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Default season"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: field:golem.activity.session,display_name:0 #: field:golem.activity.session,display_name:0
msgid "Display Name" msgid "Display Name"
@ -98,7 +108,7 @@ msgid "End date"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:111 #: code:addons/golem_activity_session/models/golem_activity_session.py:115
#, 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 ""
@ -109,7 +119,7 @@ msgid "End time"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:119 #: code:addons/golem_activity_session/models/golem_activity_session.py:123
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -192,7 +202,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:115 #: code:addons/golem_activity_session/models/golem_activity_session.py:119
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -210,13 +220,13 @@ msgid "Note"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:179 #: code:addons/golem_activity_session/models/golem_activity_session.py:183
#, 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:182 #: code:addons/golem_activity_session/models/golem_activity_session.py:186
#, python-format #, python-format
msgid "Overbooked places cannot be inferior than places" msgid "Overbooked places cannot be inferior than places"
msgstr "" msgstr ""
@ -247,12 +257,17 @@ msgid "Remaining places"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:120 #: code:addons/golem_activity_session/models/golem_activity_session.py:124
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: help:golem.activity.session,categ_id:0 #: help:golem.activity.session,categ_id:0
msgid "Select category for the current product" msgid "Select category for the current product"
@ -265,7 +280,7 @@ msgid "Sessions"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:162 #: code:addons/golem_activity_session/models/golem_activity_session.py:166
#, python-format #, python-format
msgid "Sorry, there is no more place !" msgid "Sorry, there is no more place !"
msgstr "" msgstr ""
@ -276,19 +291,19 @@ msgid "Start date"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:137 #: code:addons/golem_activity_session/models/golem_activity_session.py:141
#, 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:103 #: code:addons/golem_activity_session/models/golem_activity_session.py:107
#, python-format #, python-format
msgid "Start of the session cannot be after end of the period." 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:107 #: code:addons/golem_activity_session/models/golem_activity_session.py:111
#, 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 ""
@ -299,28 +314,28 @@ msgid "Start time"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:121 #: code:addons/golem_activity_session/models/golem_activity_session.py:125
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
#. module: golem_activity_session #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:118 #: code:addons/golem_activity_session/models/golem_activity_session.py:122
#: 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:116 #: code:addons/golem_activity_session/models/golem_activity_session.py:120
#: 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 #. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:117 #: code:addons/golem_activity_session/models/golem_activity_session.py:121
#: selection:golem.activity.session,weekday:0 #: selection:golem.activity.session,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"

View File

@ -74,6 +74,10 @@ class GolemActivitySession(models.Model):
categ_id = fields.Many2one(string='Category', categ_id = fields.Many2one(string='Category',
related='activity_id.product_id.categ_id') related='activity_id.product_id.categ_id')
animator_id = fields.Many2one('res.partner', string='Animator') animator_id = fields.Many2one('res.partner', string='Animator')
is_current = fields.Boolean('Current season?',
related='activity_id.is_current')
season_id = fields.Many2one(string='Season',
related='activity_id.season_id')
@api.onchange('activity_id') @api.onchange('activity_id')
def onchange_activity_id(self): def onchange_activity_id(self):

View File

@ -89,6 +89,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
red: places_remain == 0; red: places_remain == 0;
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="activity_id" /> <field name="activity_id" />
<field name="animator_id" /> <field name="animator_id" />
<field name="weekday" string="Day" <field name="weekday" string="Day"
@ -125,6 +126,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<search> <search>
<field name="activity_id" widget="many2one" /> <field name="activity_id" widget="many2one" />
<field name="animator_id" widget="many2one" /> <field name="animator_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<group string="Group By"> <group string="Group By">
<filter name="group_weekday" string="By weekday" <filter name="group_weekday" string="By weekday"
context="{'group_by': 'weekday'}" /> context="{'group_by': 'weekday'}" />
@ -137,7 +140,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Actions --> <!-- Actions -->
<act_window id="session_action_list" name="GOLEM Activities Sessions List" <act_window id="session_action_list" name="GOLEM Activities Sessions List"
res_model="golem.activity.session" view_mode="tree,form,calendar" /> res_model="golem.activity.session" view_mode="tree,form,calendar"
context="{'search_default_season_default': True}" />
/>
<!-- Menus --> <!-- Menus -->
<menuitem id="session_menu_list" name="Activities sessions" <menuitem id="session_menu_list" name="Activities sessions"
parent="golem_activity.activity_menu" action="session_action_list" parent="golem_activity.activity_menu" action="session_action_list"

View File

@ -26,7 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="arch" type="xml"> <field name="arch" type="xml">
<page name="other_page" position="after"> <page name="other_page" position="after">
<page name="sessions" string="Activities"> <page name="sessions" string="Activities">
<field name="activity_session_ids" /> <field name="activity_session_ids"
context="{'search_default_season_default': True}" />
</page> </page>
</page> </page>
</field> </field>