[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 ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-10 06:15+0000\n"
"PO-Revision-Date: 2016-07-10 06:15+0000\n"
"POT-Creation-Date: 2016-07-11 05:29+0000\n"
"PO-Revision-Date: 2016-07-11 05:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -78,6 +78,11 @@ msgstr "Créé par"
msgid "Created on"
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
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date"
@ -88,6 +93,11 @@ msgstr "Date"
msgid "Day"
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
#: field:golem.activity.session,display_name:0
msgid "Display Name"
@ -99,7 +109,7 @@ msgid "End date"
msgstr "Date de fin"
#. 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
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é"
@ -110,7 +120,7 @@ msgid "End time"
msgstr "Heure de fin"
#. 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
#, python-format
msgid "Friday"
@ -193,7 +203,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:115
#: code:addons/golem_activity_session/models/golem_activity_session.py:119
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Monday"
@ -211,13 +221,13 @@ msgid "Note"
msgstr "Note"
#. 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
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:182
#: code:addons/golem_activity_session/models/golem_activity_session.py:186
#, python-format
msgid "Overbooked places cannot be inferior than 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"
#. 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
#, python-format
msgid "Saturday"
msgstr "Samedi"
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr "Saison"
#. module: golem_activity_session
#: help:golem.activity.session,categ_id:0
msgid "Select category for the current product"
@ -266,7 +281,7 @@ msgid "Sessions"
msgstr "Séances"
#. 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
msgid "Sorry, there is no more place !"
msgstr "Désolé mais il n'y a plus de place disponible !"
@ -277,19 +292,19 @@ msgid "Start date"
msgstr "Date de début"
#. 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
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."
#. 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
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:107
#: code:addons/golem_activity_session/models/golem_activity_session.py:111
#, 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é"
@ -300,28 +315,28 @@ msgid "Start time"
msgstr "Heure de début"
#. 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
#, python-format
msgid "Sunday"
msgstr "Dimanche"
#. 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
#, python-format
msgid "Thursday"
msgstr "Jeudi"
#. 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
#, python-format
msgid "Tuesday"
msgstr "Mardi"
#. 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
#, python-format
msgid "Wednesday"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-10 06:15+0000\n"
"PO-Revision-Date: 2016-07-10 06:15+0000\n"
"POT-Creation-Date: 2016-07-11 05:28+0000\n"
"PO-Revision-Date: 2016-07-11 05:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -77,6 +77,11 @@ msgstr ""
msgid "Created on"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_current:0
msgid "Current season?"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date"
@ -87,6 +92,11 @@ msgstr ""
msgid "Day"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Default season"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,display_name:0
msgid "Display Name"
@ -98,7 +108,7 @@ msgid "End date"
msgstr ""
#. 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
msgid "End of the session cannot be after the end of activity date"
msgstr ""
@ -109,7 +119,7 @@ msgid "End time"
msgstr ""
#. 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
#, python-format
msgid "Friday"
@ -192,7 +202,7 @@ msgid "Minimum places to maintain the session"
msgstr ""
#. 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
#, python-format
msgid "Monday"
@ -210,13 +220,13 @@ msgid "Note"
msgstr ""
#. 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
msgid "Number of places cannot be negative."
msgstr ""
#. 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
msgid "Overbooked places cannot be inferior than places"
msgstr ""
@ -247,12 +257,17 @@ msgid "Remaining places"
msgstr ""
#. 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
#, python-format
msgid "Saturday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,categ_id:0
msgid "Select category for the current product"
@ -265,7 +280,7 @@ msgid "Sessions"
msgstr ""
#. 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
msgid "Sorry, there is no more place !"
msgstr ""
@ -276,19 +291,19 @@ msgid "Start date"
msgstr ""
#. 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
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:103
#: code:addons/golem_activity_session/models/golem_activity_session.py:107
#, 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 ""
#. 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
msgid "Start of the session cannot be before the start of activity date"
msgstr ""
@ -299,28 +314,28 @@ msgid "Start time"
msgstr ""
#. 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
#, python-format
msgid "Sunday"
msgstr ""
#. 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
#, python-format
msgid "Thursday"
msgstr ""
#. 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
#, python-format
msgid "Tuesday"
msgstr ""
#. 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
#, python-format
msgid "Wednesday"

View File

@ -74,6 +74,10 @@ class GolemActivitySession(models.Model):
categ_id = fields.Many2one(string='Category',
related='activity_id.product_id.categ_id')
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')
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;
orange: places_remain &lt;= 4;">
<field name="is_recurrent" invisible="True" />
<field name="season_id" />
<field name="activity_id" />
<field name="animator_id" />
<field name="weekday" string="Day"
@ -125,6 +126,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<search>
<field name="activity_id" widget="many2one" />
<field name="animator_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<group string="Group By">
<filter name="group_weekday" string="By weekday"
context="{'group_by': 'weekday'}" />
@ -137,7 +140,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Actions -->
<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 -->
<menuitem id="session_menu_list" name="Activities sessions"
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">
<page name="other_page" position="after">
<page name="sessions" string="Activities">
<field name="activity_session_ids" />
<field name="activity_session_ids"
context="{'search_default_season_default': True}" />
</page>
</page>
</field>