[FIX]GOLEM Season : fix duplicate / copy name and default
This commit is contained in:
parent
69d4cfcf00
commit
bb51ff6c25
@ -22,7 +22,7 @@
|
||||
- add season with name and period ;
|
||||
- choose on per default season ;
|
||||
- link optionnally one or many memberships types''',
|
||||
'version': '10.0.1.2.0',
|
||||
'version': '10.0.1.2.1',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois',
|
||||
'license': 'AGPL-3',
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-20 07:46+0000\n"
|
||||
"PO-Revision-Date: 2018-07-20 09:50+0200\n"
|
||||
"POT-Creation-Date: 2018-08-01 08:27+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 10:28+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,6 +15,12 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:93
|
||||
#, python-format
|
||||
msgid "%s (copy)"
|
||||
msgstr "%s (copie)"
|
||||
|
||||
#. module: golem_season
|
||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
||||
msgid "Counter for member number generation"
|
||||
@ -31,7 +37,7 @@ msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:75
|
||||
#: code:addons/golem_season/models/golem_season.py:76
|
||||
#, 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."
|
||||
@ -57,7 +63,7 @@ msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:71
|
||||
#: code:addons/golem_season/models/golem_season.py:72
|
||||
#, python-format
|
||||
msgid "End of the period is in range of an existing period."
|
||||
msgstr "La fin de la période est en conflit avec une période existante."
|
||||
@ -107,7 +113,7 @@ msgstr "Activer cette saison par défaut"
|
||||
#. module: golem_season
|
||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_membership_ids
|
||||
msgid "Membership types"
|
||||
msgstr "Types d'adhésion"
|
||||
msgstr "Membership types"
|
||||
|
||||
#. module: golem_season
|
||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_date_end
|
||||
@ -141,25 +147,25 @@ msgid "Seasons"
|
||||
msgstr "Saisons"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:62
|
||||
#: code:addons/golem_season/models/golem_season.py:63
|
||||
#, 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 à sa fin."
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:67
|
||||
#: code:addons/golem_season/models/golem_season.py:68
|
||||
#, python-format
|
||||
msgid "Start of the period is in range of an existing period."
|
||||
msgstr "Le début de la période est en conflit avec une période existante."
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:58
|
||||
#: code:addons/golem_season/models/golem_season.py:59
|
||||
#, python-format
|
||||
msgid "The date end is required"
|
||||
msgstr "The date end is required"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:60
|
||||
#: code:addons/golem_season/models/golem_season.py:61
|
||||
#, python-format
|
||||
msgid "The date start is required"
|
||||
msgstr "The date start is required"
|
||||
@ -172,7 +178,7 @@ msgid "This season name has already been used."
|
||||
msgstr "Ce nom pour la saison a déjà été utilisé. Merci d'en choisir un autre."
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:100
|
||||
#: code:addons/golem_season/models/golem_season.py:108
|
||||
#, python-format
|
||||
msgid "You can't delete the default season"
|
||||
msgstr "Vous ne pouvez pas supprimer la saison par défaut"
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-20 07:46+0000\n"
|
||||
"PO-Revision-Date: 2018-07-20 07:46+0000\n"
|
||||
"POT-Creation-Date: 2018-08-01 08:27+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 08:27+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,6 +15,12 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:93
|
||||
#, python-format
|
||||
msgid "%s (copy)"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
||||
msgid "Counter for member number generation"
|
||||
@ -31,7 +37,7 @@ msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:75
|
||||
#: code:addons/golem_season/models/golem_season.py:76
|
||||
#, python-format
|
||||
msgid "Current period cannot be included into another existing period."
|
||||
msgstr ""
|
||||
@ -57,7 +63,7 @@ msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:71
|
||||
#: code:addons/golem_season/models/golem_season.py:72
|
||||
#, python-format
|
||||
msgid "End of the period is in range of an existing period."
|
||||
msgstr ""
|
||||
@ -141,25 +147,25 @@ msgid "Seasons"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:62
|
||||
#: code:addons/golem_season/models/golem_season.py:63
|
||||
#, python-format
|
||||
msgid "Start of the period cannot be after end of the period."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:67
|
||||
#: code:addons/golem_season/models/golem_season.py:68
|
||||
#, python-format
|
||||
msgid "Start of the period is in range of an existing period."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:58
|
||||
#: code:addons/golem_season/models/golem_season.py:59
|
||||
#, python-format
|
||||
msgid "The date end is required"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:60
|
||||
#: code:addons/golem_season/models/golem_season.py:61
|
||||
#, python-format
|
||||
msgid "The date start is required"
|
||||
msgstr ""
|
||||
@ -172,7 +178,7 @@ msgid "This season name has already been used."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_season
|
||||
#: code:addons/golem_season/models/golem_season.py:100
|
||||
#: code:addons/golem_season/models/golem_season.py:108
|
||||
#, python-format
|
||||
msgid "You can't delete the default season"
|
||||
msgstr ""
|
||||
|
@ -36,7 +36,8 @@ class GolemSeason(models.Model):
|
||||
readonly=True, default=1)
|
||||
date_start = fields.Date('Period start')
|
||||
date_end = fields.Date('Period end')
|
||||
is_default = fields.Boolean('Default season for views?', readonly=True)
|
||||
is_default = fields.Boolean('Default season for views?', readonly=True,
|
||||
copy=False)
|
||||
|
||||
@api.onchange('membership_ids')
|
||||
def _onchange_season_dates(self):
|
||||
@ -85,6 +86,13 @@ class GolemSeason(models.Model):
|
||||
old_default_season.is_default = False
|
||||
self.is_default = True
|
||||
|
||||
@api.multi
|
||||
def copy(self, default=None):
|
||||
""" Handles copy name """
|
||||
self.ensure_one()
|
||||
default = dict(default or {}, name=_('%s (copy)') % self.name)
|
||||
return super(GolemSeason, self).copy(default)
|
||||
|
||||
@api.model
|
||||
def create(self, values):
|
||||
""" If the season if the first one created, it must be by default """
|
||||
|
Loading…
x
Reference in New Issue
Block a user