[IMP]GOLEM Activity : display hour start (or nothing) on tree

And adaptations for Activity Registration addon
This commit is contained in:
Fabien BOURGEOIS 2018-08-09 15:47:57 +02:00
parent 3ccce89bf1
commit e5fefa2e9d
7 changed files with 77 additions and 38 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM activities', 'name': 'GOLEM activities',
'summary': 'Extends Odoo products for multi-activity', 'summary': 'Extends Odoo products for multi-activity',
'description': 'Extends Odoo products for multi-activity', 'description': 'Extends Odoo products for multi-activity',
'version': '10.0.2.5.1', 'version': '10.0.2.6.0',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne', 'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-20 07:46+0000\n" "POT-Creation-Date: 2018-08-09 13:33+0000\n"
"PO-Revision-Date: 2018-07-20 10:04+0200\n" "PO-Revision-Date: 2018-08-09 15:47+0200\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -173,13 +173,13 @@ msgid "Activity audience"
msgstr "Public" msgstr "Public"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:157 #: code:addons/golem_activity/models/golem_activity.py:160
#, python-format #, python-format
msgid "Activity end date can not be set after linked season end." msgid "Activity end date can not be set after linked season end."
msgstr "La date de fin ne peut pas être apprêt la date de fin de la saison." msgstr "La date de fin ne peut pas être apprêt la date de fin de la saison."
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:153 #: code:addons/golem_activity/models/golem_activity.py:156
#, python-format #, python-format
msgid "Activity start date can not be set before linked season start." msgid "Activity start date can not be set before linked season start."
msgstr "La date de début ne peut pas être avant la date de début de la saison." msgstr "La date de début ne peut pas être avant la date de début de la saison."
@ -392,7 +392,7 @@ msgid "Expense Account"
msgstr "Compte de dépenses" msgstr "Compte de dépenses"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:175 #: code:addons/golem_activity/models/golem_activity.py:178
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -448,6 +448,16 @@ msgstr "Indique l'ordre d'affichage lorsqu'une liste d'articles est affichée."
msgid "Group By" msgid "Group By"
msgstr "Grouper par" msgstr "Grouper par"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Hour"
msgstr "Heure"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_start_display
msgid "Hour start"
msgstr "Heure de début"
#. module: golem_activity #. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_audience_id #: model:ir.model.fields,field_description:golem_activity.field_golem_activity_audience_id
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id #: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id
@ -563,7 +573,7 @@ msgid "Membership Start Date"
msgstr "Date de début d'adhésion" msgstr "Date de début d'adhésion"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:171 #: code:addons/golem_activity/models/golem_activity.py:174
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -605,6 +615,11 @@ msgstr "Article"
msgid "Product Attributes" msgid "Product Attributes"
msgstr "Caractéristiques d'articles" msgstr "Caractéristiques d'articles"
#. module: golem_activity
#: model:ir.model,name:golem_activity.model_product_category
msgid "Product Category"
msgstr "Catégorie d'article"
#. module: golem_activity #. module: golem_activity
#: model:ir.model,name:golem_activity.model_product_template #: model:ir.model,name:golem_activity.model_product_template
msgid "Product Template" msgid "Product Template"
@ -657,7 +672,7 @@ msgid "Sale Price"
msgstr "Prix de vente" msgstr "Prix de vente"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:176 #: code:addons/golem_activity/models/golem_activity.py:179
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Saturday" msgid "Saturday"
@ -710,8 +725,8 @@ msgid "Start date"
msgstr "Date de début" msgstr "Date de début"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:150 #: code:addons/golem_activity/models/golem_activity.py:153
#: code:addons/golem_activity/models/golem_activity.py:193 #: code:addons/golem_activity/models/golem_activity.py:205
#, 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"
@ -727,7 +742,7 @@ msgid "Stop time"
msgstr "Heure de fin" msgstr "Heure de fin"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:177 #: code:addons/golem_activity/models/golem_activity.py:180
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Sunday" msgid "Sunday"
@ -756,17 +771,17 @@ msgstr "Ce compte sera utilisé au lieu de celui par défaut pour les factures p
#. module: golem_activity #. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_income_id #: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_income_id
msgid "This account will be used for invoices instead of the default one to value sales for the current product." msgid "This account will be used for invoices instead of the default one to value sales for the current product."
msgstr "Ce compte sera utilisé au lieu de celui par défaut pour les factures pour comptabiliser les ventes pour le produit en cours." msgstr "Ce compte sera utilisé au lieu de celui par défaut pour les factures pour comptabiliser les ventes pour l'article cours."
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:40 #: code:addons/golem_activity/models/golem_activity.py:42
#: sql_constraint:golem.activity.audience:0 #: sql_constraint:golem.activity.audience:0
#, python-format #, python-format
msgid "This activity audience name has already been used." msgid "This activity audience name has already been used."
msgstr "Un public d'activité porte déjà ce nom." msgstr "Un public d'activité porte déjà ce nom."
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:28 #: code:addons/golem_activity/models/golem_activity.py:30
#: sql_constraint:golem.activity.type:0 #: sql_constraint:golem.activity.type:0
#, python-format #, python-format
msgid "This activity type name has already been used." msgid "This activity type name has already been used."
@ -778,7 +793,7 @@ msgid "This field holds the image used as image for the activity."
msgstr "This field holds the image used as image for the activity." msgstr "This field holds the image used as image for the activity."
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:174 #: code:addons/golem_activity/models/golem_activity.py:177
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Thursday" msgid "Thursday"
@ -795,7 +810,7 @@ msgid "True"
msgstr "True" msgstr "True"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:172 #: code:addons/golem_activity/models/golem_activity.py:175
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Tuesday" msgid "Tuesday"
@ -813,7 +828,7 @@ msgid "Unit of Measure"
msgstr "Unité de mesure" msgstr "Unité de mesure"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:123 #: code:addons/golem_activity/models/golem_activity.py:126
#, python-format #, python-format
msgid "Unsupported operator for defautl season search" msgid "Unsupported operator for defautl season search"
msgstr "Opérateur de recherche non supporté pour le filtre de la saison par défaut" msgstr "Opérateur de recherche non supporté pour le filtre de la saison par défaut"
@ -839,7 +854,7 @@ msgid "Warranty"
msgstr "Garantie" msgstr "Garantie"
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:173 #: code:addons/golem_activity/models/golem_activity.py:176
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-20 07:46+0000\n" "POT-Creation-Date: 2018-08-09 13:33+0000\n"
"PO-Revision-Date: 2018-07-20 07:46+0000\n" "PO-Revision-Date: 2018-08-09 13:33+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -170,13 +170,13 @@ msgid "Activity audience"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:157 #: code:addons/golem_activity/models/golem_activity.py:160
#, python-format #, python-format
msgid "Activity end date can not be set after linked season end." msgid "Activity end date can not be set after linked season end."
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:153 #: code:addons/golem_activity/models/golem_activity.py:156
#, python-format #, python-format
msgid "Activity start date can not be set before linked season start." msgid "Activity start date can not be set before linked season start."
msgstr "" msgstr ""
@ -389,7 +389,7 @@ msgid "Expense Account"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:175 #: code:addons/golem_activity/models/golem_activity.py:178
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Friday" msgid "Friday"
@ -445,6 +445,16 @@ msgstr ""
msgid "Group By" msgid "Group By"
msgstr "" msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Hour"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_start_display
msgid "Hour start"
msgstr ""
#. module: golem_activity #. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_audience_id #: model:ir.model.fields,field_description:golem_activity.field_golem_activity_audience_id
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id #: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id
@ -560,7 +570,7 @@ msgid "Membership Start Date"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:171 #: code:addons/golem_activity/models/golem_activity.py:174
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Monday" msgid "Monday"
@ -602,6 +612,11 @@ msgstr ""
msgid "Product Attributes" msgid "Product Attributes"
msgstr "" msgstr ""
#. module: golem_activity
#: model:ir.model,name:golem_activity.model_product_category
msgid "Product Category"
msgstr ""
#. module: golem_activity #. module: golem_activity
#: model:ir.model,name:golem_activity.model_product_template #: model:ir.model,name:golem_activity.model_product_template
msgid "Product Template" msgid "Product Template"
@ -654,7 +669,7 @@ msgid "Sale Price"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:176 #: code:addons/golem_activity/models/golem_activity.py:179
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Saturday" msgid "Saturday"
@ -707,8 +722,8 @@ msgid "Start date"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:150 #: code:addons/golem_activity/models/golem_activity.py:153
#: code:addons/golem_activity/models/golem_activity.py:193 #: code:addons/golem_activity/models/golem_activity.py:205
#, 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 ""
@ -724,7 +739,7 @@ msgid "Stop time"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:177 #: code:addons/golem_activity/models/golem_activity.py:180
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Sunday" msgid "Sunday"
@ -756,14 +771,14 @@ msgid "This account will be used for invoices instead of the default one to valu
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:40 #: code:addons/golem_activity/models/golem_activity.py:42
#: sql_constraint:golem.activity.audience:0 #: sql_constraint:golem.activity.audience:0
#, python-format #, python-format
msgid "This activity audience name has already been used." msgid "This activity audience name has already been used."
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:28 #: code:addons/golem_activity/models/golem_activity.py:30
#: sql_constraint:golem.activity.type:0 #: sql_constraint:golem.activity.type:0
#, python-format #, python-format
msgid "This activity type name has already been used." msgid "This activity type name has already been used."
@ -775,7 +790,7 @@ msgid "This field holds the image used as image for the activity."
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:174 #: code:addons/golem_activity/models/golem_activity.py:177
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Thursday" msgid "Thursday"
@ -792,7 +807,7 @@ msgid "True"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:172 #: code:addons/golem_activity/models/golem_activity.py:175
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Tuesday" msgid "Tuesday"
@ -810,7 +825,7 @@ msgid "Unit of Measure"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:123 #: code:addons/golem_activity/models/golem_activity.py:126
#, python-format #, python-format
msgid "Unsupported operator for defautl season search" msgid "Unsupported operator for defautl season search"
msgstr "" msgstr ""
@ -836,7 +851,7 @@ msgid "Warranty"
msgstr "" msgstr ""
#. module: golem_activity #. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:173 #: code:addons/golem_activity/models/golem_activity.py:176
#: selection:golem.activity,weekday:0 #: selection:golem.activity,weekday:0
#, python-format #, python-format
msgid "Wednesday" msgid "Wednesday"

View File

@ -180,6 +180,15 @@ class GolemActivity(models.Model):
('sun', _('Sunday'))], copy=False) ('sun', _('Sunday'))], copy=False)
hour_start = fields.Float('Start time', copy=False) hour_start = fields.Float('Start time', copy=False)
hour_stop = fields.Float('Stop time', copy=False) hour_stop = fields.Float('Stop time', copy=False)
hour_start_display = fields.Char('Hour start',
compute='_compute_hour_start_display')
@api.depends('hour_start')
def _compute_hour_start_display(self):
""" Computes datetime from day hour start """
for activity in self:
activity.hour_start_display = (activity.hour_start if
activity.hour_start else u'')
@api.onchange('hour_start') @api.onchange('hour_start')
def _onchange_hour_start(self): def _onchange_hour_start(self):

View File

@ -118,9 +118,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="type_id" /> <field name="type_id" />
<field name="full_name" /> <field name="full_name" />
<field name="animator_id" /> <field name="animator_id" />
<field name="weekday" string="Day" <field name="weekday" string="Day" />
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="date_start" string="Date" /> <field name="date_start" string="Date" />
<field name="hour_start_display" string="Hour" widget="float_time" />
<field name="list_price" sum="True" /> <field name="list_price" sum="True" />
</tree> </tree>
</field> </field>

View File

@ -18,7 +18,7 @@
{ {
'name': 'GOLEM Activity Member Registrations', 'name': 'GOLEM Activity Member Registrations',
'summary': 'GOLEM Activities Member Registrations management', 'summary': 'GOLEM Activities Member Registrations management',
'version': '10.0.1.4.3', 'version': '10.0.1.4.4',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne', 'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tree position="attributes"> <tree position="attributes">
<attribute name="colors">red: places_remain == 0;orange: places_remain &lt;= 4;</attribute> <attribute name="colors">red: places_remain == 0;orange: places_remain &lt;= 4;</attribute>
</tree> </tree>
<field name="date_start" position="after"> <field name="hour_start_display" position="after">
<field name="places" invisible="True" /> <field name="places" invisible="True" />
<field name="places_remain" string="Remain" /> <field name="places_remain" string="Remain" />
</field> </field>