forked from Yaltik/golem
[FIX]GOLEM Seasons : fix for translations on warnings and for first default season
This commit is contained in:
parent
4e8671f69a
commit
963543161e
@ -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 05:22+0000\n"
|
"POT-Creation-Date: 2016-07-11 17:19+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-11 05:22+0000\n"
|
"PO-Revision-Date: 2016-07-11 17:19+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -31,6 +31,12 @@ msgstr "Créé par"
|
|||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr "Créé le"
|
msgstr "Créé le"
|
||||||
|
|
||||||
|
#. module: golem_season
|
||||||
|
#: code:addons/golem_season/models/golem_season.py:53
|
||||||
|
#, python-format
|
||||||
|
msgid "Current period cannot be included into another existing period."
|
||||||
|
msgstr "La période actuelle est en conflit avec une période existante."
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: view:golem.season:golem_season.filter
|
#: view:golem.season:golem_season.filter
|
||||||
msgid "Default season"
|
msgid "Default season"
|
||||||
@ -52,10 +58,10 @@ msgid "Display Name"
|
|||||||
msgstr "Nom affiché"
|
msgstr "Nom affiché"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:50
|
#: code:addons/golem_season/models/golem_season.py:49
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "End of the period is in range of an existing period {}"
|
msgid "End of the period is in range of an existing period."
|
||||||
msgstr "La fin de la période est en conflit avec la période existante {}"
|
msgstr "La fin de la période est en conflit avec une période existante."
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: model:ir.model,name:golem_season.model_golem_season
|
#: model:ir.model,name:golem_season.model_golem_season
|
||||||
@ -103,12 +109,6 @@ msgstr "Fin de la période"
|
|||||||
msgid "Period start"
|
msgid "Period start"
|
||||||
msgstr "Début de la période"
|
msgstr "Début de la période"
|
||||||
|
|
||||||
#. module: golem_season
|
|
||||||
#: code:addons/golem_season/models/golem_season.py:54
|
|
||||||
#, python-format
|
|
||||||
msgid "Period {} cannot be included into current period"
|
|
||||||
msgstr "La période {} ne peut être incluse dans la période en cours"
|
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: view:golem.season:golem_season.form
|
#: view:golem.season:golem_season.form
|
||||||
msgid "Season"
|
msgid "Season"
|
||||||
@ -126,13 +126,13 @@ 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 à sa fin."
|
msgstr "Le début de la période ne peut être postérieur à sa fin."
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:46
|
#: code:addons/golem_season/models/golem_season.py:45
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Start of the period is in range of an existing period {}"
|
msgid "Start of the period is in range of an existing period."
|
||||||
msgstr "Le début de la période est en conflit avec la période existante {}"
|
msgstr "Le début de la période est en conflit avec une période existante."
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:74
|
#: code:addons/golem_season/models/golem_season.py:75
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "You can't delete the default season"
|
msgid "You can't delete the default season"
|
||||||
msgstr "Vous ne pouvez pas supprimer la saison par défaut"
|
msgstr "Vous ne pouvez pas supprimer la saison par défaut"
|
||||||
|
@ -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 05:22+0000\n"
|
"POT-Creation-Date: 2016-07-11 17:19+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-11 05:22+0000\n"
|
"PO-Revision-Date: 2016-07-11 17:19+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -30,6 +30,12 @@ msgstr ""
|
|||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_season
|
||||||
|
#: code:addons/golem_season/models/golem_season.py:53
|
||||||
|
#, python-format
|
||||||
|
msgid "Current period cannot be included into another existing period."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: view:golem.season:golem_season.filter
|
#: view:golem.season:golem_season.filter
|
||||||
msgid "Default season"
|
msgid "Default season"
|
||||||
@ -51,9 +57,9 @@ msgid "Display Name"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:50
|
#: code:addons/golem_season/models/golem_season.py:49
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "End of the period is in range of an existing period {}"
|
msgid "End of the period is in range of an existing period."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
@ -102,12 +108,6 @@ msgstr ""
|
|||||||
msgid "Period start"
|
msgid "Period start"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
|
||||||
#: code:addons/golem_season/models/golem_season.py:54
|
|
||||||
#, python-format
|
|
||||||
msgid "Period {} cannot be included into current period"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: view:golem.season:golem_season.form
|
#: view:golem.season:golem_season.form
|
||||||
msgid "Season"
|
msgid "Season"
|
||||||
@ -125,13 +125,13 @@ msgid "Start of the period cannot be after end of the period."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:46
|
#: code:addons/golem_season/models/golem_season.py:45
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Start of the period is in range of an existing period {}"
|
msgid "Start of the period is in range of an existing period."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:74
|
#: code:addons/golem_season/models/golem_season.py:75
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "You can't delete the default season"
|
msgid "You can't delete the default season"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -42,16 +42,16 @@ class GolemSeason(models.Model):
|
|||||||
seasons = self.env['golem.season'].search([])
|
seasons = self.env['golem.season'].search([])
|
||||||
for s in seasons:
|
for s in seasons:
|
||||||
if s.date_start < season.date_start < s.date_end:
|
if s.date_start < season.date_start < s.date_end:
|
||||||
msg = _('Start of the period is in range of an '
|
msg = _(u'Start of the period is in range of an '
|
||||||
'existing period {}'.format(s.name))
|
'existing period.')
|
||||||
raise models.ValidationError(msg)
|
raise models.ValidationError(msg)
|
||||||
if s.date_start < season.date_end < s.date_end:
|
if s.date_start < season.date_end < s.date_end:
|
||||||
msg = _('End of the period is in range of an '
|
msg = _(u'End of the period is in range of an '
|
||||||
'existing period {}'.format(s.name))
|
'existing period.')
|
||||||
raise models.ValidationError(msg)
|
raise models.ValidationError(msg)
|
||||||
if season.date_start < s.date_start < season.date_end:
|
if season.date_start < s.date_start < season.date_end:
|
||||||
msg = _('Period {} cannot be included into current '
|
msg = _(u'Current period cannot be included into '
|
||||||
'period'.format(s.name))
|
'another existing period.')
|
||||||
raise models.ValidationError(msg)
|
raise models.ValidationError(msg)
|
||||||
|
|
||||||
is_default = fields.Boolean('Default season for views?', readonly=True)
|
is_default = fields.Boolean('Default season for views?', readonly=True)
|
||||||
@ -60,7 +60,8 @@ class GolemSeason(models.Model):
|
|||||||
def do_default_season(self):
|
def do_default_season(self):
|
||||||
""" is_default on and ensure that only one is_default is active """
|
""" is_default on and ensure that only one is_default is active """
|
||||||
old_default_season = self.search([('is_default', '=', True)])
|
old_default_season = self.search([('is_default', '=', True)])
|
||||||
old_default_season.is_default = False
|
if old_default_season:
|
||||||
|
old_default_season.is_default = False
|
||||||
self.is_default = True
|
self.is_default = True
|
||||||
all_members = self.env['golem.member'].search([])
|
all_members = self.env['golem.member'].search([])
|
||||||
all_members._compute_is_current()
|
all_members._compute_is_current()
|
||||||
|
Loading…
Reference in New Issue
Block a user