summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-10-14 16:28:20 +0000
committerfw-bot <otis@odoo.com>2019-10-14 17:55:58 +0000
commitab4a59b0eafcca035f7b7af3b2357ae061da5674 (patch)
treec2d83b4f5768d88c43eb35918bcc23c606f74353 /addons/web/static/src/js/fields/basic_fields.js
parentf66c5c594a50c6a279287d78bcf5b5e136213d80 (diff)
[FIX] website, website_theme_install: fix theme selection in settings
Follow up of commit a3845ae3f058772d4b548c703f5ddf94b571d903 Issue ===== Since the above commit there is a confirmation dialog when clicking on a button, for which the only options are to Discard or Cancel. The problem is that when discarding it will revert the selected website back to the default value. Therefore before the current commit it is impossible to install a theme on a website other than the first. Solution ======== The solution is to avoid showing this dialog when clicking on buttons for which the result depends on the currently selected website. This leads to the same behavior as what existed before the mentioned commit: the settings are implicitly discarded because they are not saved, but at the time of the click the transient model still holds the non-discarded value that the user selected. This restores the "select a theme" feature, but also restores the unfortunate side effect that the user might unknowingly loose all of his pending changes when clicking on the button, but only for those two specific buttons. Other considerations ==================== Saving instead of Discarding was considered but it is impossible to do because saving might do a lot of changes that might even lead to the installation of modules, so the settings page has to be reloaded to apply them, and then the website field will be reset to its default value again. Instead of changing website specific settings from the main settings, it was considered to update them through a form view, but it is apparently too complicated for on-boarding. The last consideration was that the settings view should actually mark the corresponding fields as unchanged when changing the website, but it is too complex to implement for a case that is not supported in the first place, especially for a fix in a stable version. task-2083198 closes odoo/odoo#38745 X-original-commit: 2298ef19bcd9e7a14958dce9a93cea69258064d8 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions