[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 ;
|
- add season with name and period ;
|
||||||
- choose on per default season ;
|
- choose on per default season ;
|
||||||
- link optionnally one or many memberships types''',
|
- link optionnally one or many memberships types''',
|
||||||
'version': '10.0.1.2.0',
|
'version': '10.0.1.2.1',
|
||||||
'category': 'GOLEM',
|
'category': 'GOLEM',
|
||||||
'author': 'Fabien Bourgeois',
|
'author': 'Fabien Bourgeois',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
|
@ -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-01 08:27+0000\n"
|
||||||
"PO-Revision-Date: 2018-07-20 09:50+0200\n"
|
"PO-Revision-Date: 2018-08-01 10:28+0200\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -15,6 +15,12 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
"Plural-Forms: \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
|
#. module: golem_season
|
||||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
||||||
msgid "Counter for member number generation"
|
msgid "Counter for member number generation"
|
||||||
@ -31,7 +37,7 @@ msgid "Created on"
|
|||||||
msgstr "Créé le"
|
msgstr "Créé le"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:75
|
#: code:addons/golem_season/models/golem_season.py:76
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Current period cannot be included into another existing period."
|
msgid "Current period cannot be included into another existing period."
|
||||||
msgstr "La période actuelle est en conflit avec une période existante."
|
msgstr "La période actuelle est en conflit avec une période existante."
|
||||||
@ -57,7 +63,7 @@ msgid "Display Name"
|
|||||||
msgstr "Nom affiché"
|
msgstr "Nom affiché"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:71
|
#: code:addons/golem_season/models/golem_season.py:72
|
||||||
#, 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 une période existante."
|
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
|
#. module: golem_season
|
||||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_membership_ids
|
#: model:ir.model.fields,field_description:golem_season.field_golem_season_membership_ids
|
||||||
msgid "Membership types"
|
msgid "Membership types"
|
||||||
msgstr "Types d'adhésion"
|
msgstr "Membership types"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_date_end
|
#: model:ir.model.fields,field_description:golem_season.field_golem_season_date_end
|
||||||
@ -141,25 +147,25 @@ msgid "Seasons"
|
|||||||
msgstr "Saisons"
|
msgstr "Saisons"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:62
|
#: code:addons/golem_season/models/golem_season.py:63
|
||||||
#, 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 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:67
|
#: code:addons/golem_season/models/golem_season.py:68
|
||||||
#, 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 une 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:58
|
#: code:addons/golem_season/models/golem_season.py:59
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The date end is required"
|
msgid "The date end is required"
|
||||||
msgstr "The date end is required"
|
msgstr "The date end is required"
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:60
|
#: code:addons/golem_season/models/golem_season.py:61
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The date start is required"
|
msgid "The date start is required"
|
||||||
msgstr "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."
|
msgstr "Ce nom pour la saison a déjà été utilisé. Merci d'en choisir un autre."
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:100
|
#: code:addons/golem_season/models/golem_season.py:108
|
||||||
#, 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 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-01 08:27+0000\n"
|
||||||
"PO-Revision-Date: 2018-07-20 07:46+0000\n"
|
"PO-Revision-Date: 2018-08-01 08:27+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -15,6 +15,12 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
"Plural-Forms: \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
|
#. module: golem_season
|
||||||
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
|
||||||
msgid "Counter for member number generation"
|
msgid "Counter for member number generation"
|
||||||
@ -31,7 +37,7 @@ msgid "Created on"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:75
|
#: code:addons/golem_season/models/golem_season.py:76
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Current period cannot be included into another existing period."
|
msgid "Current period cannot be included into another existing period."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -57,7 +63,7 @@ msgid "Display Name"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:71
|
#: code:addons/golem_season/models/golem_season.py:72
|
||||||
#, 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 ""
|
||||||
@ -141,25 +147,25 @@ msgid "Seasons"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:62
|
#: code:addons/golem_season/models/golem_season.py:63
|
||||||
#, 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 ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:67
|
#: code:addons/golem_season/models/golem_season.py:68
|
||||||
#, 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:58
|
#: code:addons/golem_season/models/golem_season.py:59
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The date end is required"
|
msgid "The date end is required"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:60
|
#: code:addons/golem_season/models/golem_season.py:61
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The date start is required"
|
msgid "The date start is required"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -172,7 +178,7 @@ msgid "This season name has already been used."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_season
|
#. module: golem_season
|
||||||
#: code:addons/golem_season/models/golem_season.py:100
|
#: code:addons/golem_season/models/golem_season.py:108
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "You can't delete the default season"
|
msgid "You can't delete the default season"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -36,7 +36,8 @@ class GolemSeason(models.Model):
|
|||||||
readonly=True, default=1)
|
readonly=True, default=1)
|
||||||
date_start = fields.Date('Period start')
|
date_start = fields.Date('Period start')
|
||||||
date_end = fields.Date('Period end')
|
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')
|
@api.onchange('membership_ids')
|
||||||
def _onchange_season_dates(self):
|
def _onchange_season_dates(self):
|
||||||
@ -85,6 +86,13 @@ class GolemSeason(models.Model):
|
|||||||
old_default_season.is_default = False
|
old_default_season.is_default = False
|
||||||
self.is_default = True
|
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
|
@api.model
|
||||||
def create(self, values):
|
def create(self, values):
|
||||||
""" If the season if the first one created, it must be by default """
|
""" If the season if the first one created, it must be by default """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user