Skip to content
Snippets Groups Projects
Commit 29f12da0 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] event: allow de installation of all track submodules at once


Website event track module is an advanced event module that is required notably
in some sub modules: live, quizzes, exhibitors.

When unchecking Schedule & Tracks in event settings, submodules checkboxes
are hidden. It means that currently you may uncheck module_website_event_track
while still keeping sub modules (_track_live, _track_quiz, _track_exhibitor)
checked. When saving, modules are uninstalled, then installed again if one
of sub module is still checked.

In this commit we add an onchange so that unchecking track also unchecks all
its sub modules to effectively remove them all.

Task ID-2389569

closes odoo/odoo#61995

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 89a1989b
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
from odoo import fields, models
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
......@@ -14,3 +14,14 @@ class ResConfigSettings(models.TransientModel):
module_website_event_questions = fields.Boolean("Registration Survey")
module_event_barcode = fields.Boolean("Barcode")
module_website_event_sale = fields.Boolean("Online Ticketing")
@api.onchange('module_website_event_track')
def _onchange_module_website_event_track(self):
""" Reset sub-modules, otherwise you may have track to False but still
have track_live or track_quiz to True, meaning track will come back due
to dependencies of modules. """
for config in self:
if not config.module_website_event_track:
config.module_website_event_track_live = False
config.module_website_event_track_quiz = False
config.module_website_event_track_exhibitor = False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment