Compare commits
15 Commits
master
...
michel_act
Author | SHA1 | Date | |
---|---|---|---|
|
a60f41c170 | ||
|
e0c25a24e1 | ||
|
7ce13e730f | ||
|
b7234e5c75 | ||
|
08476a4e67 | ||
|
588954ab0b | ||
|
64115c746c | ||
|
62741ca650 | ||
|
fcf151b615 | ||
|
7727e9d51d | ||
|
149654fdb6 | ||
|
48e5ae7308 | ||
|
85a2bf1214 | ||
|
8b7b88a889 | ||
|
a65a2f3249 |
@ -18,9 +18,9 @@
|
||||
{
|
||||
'name': 'GOLEM activities',
|
||||
'summary': 'Extends Odoo products for multi-activity',
|
||||
'version': '10.0.2.0.0',
|
||||
'version': '10.0.2.1.0',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois',
|
||||
'author': 'Fabien Bourgeois, Michel Dessenne',
|
||||
'license': 'AGPL-3',
|
||||
'application': True,
|
||||
'installable': True,
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-14 06:14+0000\n"
|
||||
"PO-Revision-Date: 2017-06-14 06:14+0000\n"
|
||||
"POT-Creation-Date: 2018-02-01 16:28+0000\n"
|
||||
"PO-Revision-Date: 2018-02-01 16:28+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -78,6 +78,18 @@ msgstr "Nom de l'activité"
|
||||
msgid "Activity Types"
|
||||
msgstr "Types d'activité"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:120
|
||||
#, python-format
|
||||
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."
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:116
|
||||
#, python-format
|
||||
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."
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_name
|
||||
msgid "Activity type"
|
||||
@ -273,7 +285,7 @@ msgid "Expense Account"
|
||||
msgstr "Compte de dépenses"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:120
|
||||
#: code:addons/golem_activity/models/golem_activity.py:138
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Friday"
|
||||
@ -350,6 +362,11 @@ msgstr "Numéro d'article international (IAN) utilisé pour identifier cet artic
|
||||
msgid "Invoicing"
|
||||
msgstr "Facturation"
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_fullseason
|
||||
msgid "Is full season?"
|
||||
msgstr "Est sur toute la saison ?"
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_recurrent
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_is_recurrent
|
||||
@ -405,7 +422,7 @@ msgid "Membership Start Date"
|
||||
msgstr "Date de début d'adhésion"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:116
|
||||
#: code:addons/golem_activity/models/golem_activity.py:134
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Monday"
|
||||
@ -493,7 +510,7 @@ msgid "Sale Price"
|
||||
msgstr "Prix de vente"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:121
|
||||
#: code:addons/golem_activity/models/golem_activity.py:139
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Saturday"
|
||||
@ -540,8 +557,8 @@ msgid "Start date"
|
||||
msgstr "Date de début"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:103
|
||||
#: code:addons/golem_activity/models/golem_activity.py:138
|
||||
#: code:addons/golem_activity/models/golem_activity.py:113
|
||||
#: code:addons/golem_activity/models/golem_activity.py:156
|
||||
#, 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"
|
||||
@ -557,7 +574,7 @@ msgid "Stop time"
|
||||
msgstr "Heure de fin"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:122
|
||||
#: code:addons/golem_activity/models/golem_activity.py:140
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Sunday"
|
||||
@ -601,7 +618,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."
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:119
|
||||
#: code:addons/golem_activity/models/golem_activity.py:137
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Thursday"
|
||||
@ -618,14 +635,14 @@ msgid "True"
|
||||
msgstr "True"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:117
|
||||
#: code:addons/golem_activity/models/golem_activity.py:135
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Tuesday"
|
||||
msgstr "Mardi"
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3959
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3891
|
||||
msgid "Type"
|
||||
msgstr "Type"
|
||||
|
||||
@ -655,7 +672,7 @@ msgid "Warranty"
|
||||
msgstr "Garantie"
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:118
|
||||
#: code:addons/golem_activity/models/golem_activity.py:136
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Wednesday"
|
||||
@ -680,4 +697,3 @@ msgstr "Atelier"
|
||||
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
|
||||
msgid "describe the activity characteristics..."
|
||||
msgstr "Décrivez ici les caractéristiques de l'activité..."
|
||||
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-14 06:14+0000\n"
|
||||
"PO-Revision-Date: 2017-06-14 06:14+0000\n"
|
||||
"POT-Creation-Date: 2018-02-01 16:28+0000\n"
|
||||
"PO-Revision-Date: 2018-02-01 16:28+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -74,6 +74,18 @@ msgstr ""
|
||||
msgid "Activity Types"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:120
|
||||
#, python-format
|
||||
msgid "Activity end date can not be set after linked season start."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:116
|
||||
#, python-format
|
||||
msgid "Activity start date can not be set before linked season start."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_name
|
||||
msgid "Activity type"
|
||||
@ -269,7 +281,7 @@ msgid "Expense Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:120
|
||||
#: code:addons/golem_activity/models/golem_activity.py:138
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Friday"
|
||||
@ -346,6 +358,11 @@ msgstr ""
|
||||
msgid "Invoicing"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_fullseason
|
||||
msgid "Is full season?"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_recurrent
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_is_recurrent
|
||||
@ -401,7 +418,7 @@ msgid "Membership Start Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:116
|
||||
#: code:addons/golem_activity/models/golem_activity.py:134
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Monday"
|
||||
@ -489,7 +506,7 @@ msgid "Sale Price"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:121
|
||||
#: code:addons/golem_activity/models/golem_activity.py:139
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Saturday"
|
||||
@ -536,8 +553,8 @@ msgid "Start date"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:103
|
||||
#: code:addons/golem_activity/models/golem_activity.py:138
|
||||
#: code:addons/golem_activity/models/golem_activity.py:113
|
||||
#: code:addons/golem_activity/models/golem_activity.py:156
|
||||
#, python-format
|
||||
msgid "Start of the period cannot be after end of the period."
|
||||
msgstr ""
|
||||
@ -553,7 +570,7 @@ msgid "Stop time"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:122
|
||||
#: code:addons/golem_activity/models/golem_activity.py:140
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Sunday"
|
||||
@ -597,7 +614,7 @@ msgid "This field holds the image used as image for the activity."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:119
|
||||
#: code:addons/golem_activity/models/golem_activity.py:137
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Thursday"
|
||||
@ -614,14 +631,14 @@ msgid "True"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:117
|
||||
#: code:addons/golem_activity/models/golem_activity.py:135
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Tuesday"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3959
|
||||
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3891
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
@ -651,7 +668,7 @@ msgid "Warranty"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity
|
||||
#: code:addons/golem_activity/models/golem_activity.py:118
|
||||
#: code:addons/golem_activity/models/golem_activity.py:136
|
||||
#: selection:golem.activity,weekday:0
|
||||
#, python-format
|
||||
msgid "Wednesday"
|
||||
|
@ -30,6 +30,7 @@ class GolemActivityType(models.Model):
|
||||
name = fields.Char('Activity type', required=True, translate=True)
|
||||
is_recurrent = fields.Boolean('Is recurrent?')
|
||||
|
||||
|
||||
class GolemActivity(models.Model):
|
||||
""" GOLEM Activity """
|
||||
_name = 'golem.activity'
|
||||
@ -46,8 +47,17 @@ class GolemActivity(models.Model):
|
||||
|
||||
full_name = fields.Char('Name', compute='_compute_full_name', store=True,
|
||||
index=True)
|
||||
is_fullseason = fields.Boolean('Is full season?',
|
||||
compute='_compute_is_full_season')
|
||||
|
||||
@api.depends('date_start', 'date_stop')
|
||||
def _compute_is_full_season(self):
|
||||
""" Display date for is full season """
|
||||
for activity in self:
|
||||
if activity.date_start == activity.season_id.date_start and \
|
||||
activity.date_stop == activity.season_id.date_end:
|
||||
activity.is_fullseason = True
|
||||
|
||||
@api.multi
|
||||
@api.depends('name', 'default_code')
|
||||
def _compute_full_name(self):
|
||||
""" Provide a better displayed name """
|
||||
@ -102,6 +112,14 @@ class GolemActivity(models.Model):
|
||||
activity.date_start > activity.date_stop:
|
||||
raise models.ValidationError(_('Start of the period cannot be '
|
||||
'after end of the period.'))
|
||||
if activity.season_id.date_start > activity.date_start:
|
||||
msg = _(u'Activity start date can not be set before '
|
||||
'linked season start.')
|
||||
raise models.ValidationError(msg)
|
||||
if activity.season_id.date_end < activity.date_stop:
|
||||
msg = _(u'Activity end date can not be set after '
|
||||
'linked season end.')
|
||||
raise models.ValidationError(msg)
|
||||
|
||||
@api.onchange('season_id')
|
||||
def _onchange_season_dates(self):
|
||||
|
@ -59,10 +59,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
||||
<field name="hour_stop" widget="float_time"
|
||||
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
||||
|
||||
<field name="is_fullseason" readonly="False"
|
||||
attrs="{'invisible':[('is_recurrent', '=', False)]}" />
|
||||
<field name="date_start"
|
||||
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
||||
attrs="{'invisible':[('is_recurrent', '=', True),
|
||||
('is_fullseason', '=', True)]}" />
|
||||
<field name="date_stop"
|
||||
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
||||
attrs="{'invisible':[('is_recurrent', '=', True),
|
||||
('is_fullseason', '=', True)]}" />
|
||||
</group>
|
||||
<group name="places">
|
||||
</group>
|
||||
@ -111,8 +116,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="animator_id" />
|
||||
<field name="weekday" string="Day"
|
||||
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
||||
<field name="date_start" string="Date"
|
||||
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
||||
<field name="date_start" string="Date" />
|
||||
<field name="list_price" sum="True" />
|
||||
</tree>
|
||||
</field>
|
||||
|
Loading…
x
Reference in New Issue
Block a user