[FIX]GOLEM Season : do now allow default_season removal
This commit is contained in:
parent
e2a0671b4b
commit
66c3964464
@ -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:07+0000\n"
|
"POT-Creation-Date: 2016-07-11 05:22+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-11 05:07+0000\n"
|
"PO-Revision-Date: 2016-07-11 05:22+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -131,3 +131,9 @@ msgstr "Le début de la période ne peut être postérieur à sa fin."
|
|||||||
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 la période existante {}"
|
||||||
|
|
||||||
|
#. module: golem_season
|
||||||
|
#: code:addons/golem_season/models/golem_season.py:74
|
||||||
|
#, 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 ""
|
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:06+0000\n"
|
"POT-Creation-Date: 2016-07-11 05:22+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-11 05:06+0000\n"
|
"PO-Revision-Date: 2016-07-11 05:22+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -130,3 +130,9 @@ msgstr ""
|
|||||||
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
|
||||||
|
#: code:addons/golem_season/models/golem_season.py:74
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete the default season"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
@ -67,17 +67,11 @@ class GolemSeason(models.Model):
|
|||||||
all_members._compute_number()
|
all_members._compute_number()
|
||||||
self.env['golem.activity'].search([])._compute_is_current()
|
self.env['golem.activity'].search([])._compute_is_current()
|
||||||
|
|
||||||
# @api.multi
|
@api.multi
|
||||||
# def write(self, values):
|
def unlink(self):
|
||||||
# """ Extends write to recomputes all current members in case of
|
for s in self:
|
||||||
# is_default changes and ensures that only one is_default is active """
|
if s.is_default:
|
||||||
# res = super(GolemSeason, self).write(values)
|
emsg = _('You can\'t delete the default season')
|
||||||
# is_new_default = values.get('is_default')
|
raise models.ValidationError(emsg)
|
||||||
# old_default_season = self.search([('is_default', '=', True)])
|
else:
|
||||||
# if is_new_default:
|
return super(GolemSeason, self).unlink()
|
||||||
# if old_default_season:
|
|
||||||
# old_default_season.is_default = False
|
|
||||||
# self.env['golem.member'].search([])._compute_is_current()
|
|
||||||
# self.env['golem.member'].search([])._compute_number()
|
|
||||||
# self.env['golem.activity'].search([])._compute_is_current()
|
|
||||||
# return res
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user