diff --git a/addons/website/models/res_config_settings.py b/addons/website/models/res_config_settings.py index e509d237a66..9501ab5cf15 100644 --- a/addons/website/models/res_config_settings.py +++ b/addons/website/models/res_config_settings.py @@ -168,6 +168,7 @@ class ResConfigSettings(models.TransientModel): } def action_open_robots(self): + self.website_id._force() return { 'name': _("Robots.txt"), 'view_mode': 'form', diff --git a/addons/website/static/src/js/backend/res_config_settings.js b/addons/website/static/src/js/backend/res_config_settings.js index 80f6f21418c..2ebee758abc 100644 --- a/addons/website/static/src/js/backend/res_config_settings.js +++ b/addons/website/static/src/js/backend/res_config_settings.js @@ -24,6 +24,9 @@ BaseSettingController.include({ * Without this override, it is impossible to go to a website other than the * first because discarding will revert it back to the default value. * + * Without this override, it is impossible to edit robots.txt website other than the + * first because discarding will revert it back to the default value. + * * Without this override, it is impossible to install a theme on a website * other than the first because discarding will revert it back to the * default value. @@ -32,6 +35,7 @@ BaseSettingController.include({ */ _onButtonClicked: function (ev) { if (ev.data.attrs.name === 'website_go_to' + || ev.data.attrs.name === 'action_open_robots' || ev.data.attrs.name === 'install_theme_on_current_website') { FormController.prototype._onButtonClicked.apply(this, arguments); } else {