Skip to content
Snippets Groups Projects
Commit d66d44db authored by Ivan Yelizariev's avatar Ivan Yelizariev
Browse files

[FIX] website: allow edit robots.txt to non-first website

Previous implementation always updated *current website*, which is not
always the same as the value from `res.config.settings`.

---

opw-2623007
parent a725fed5
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,7 @@ class ResConfigSettings(models.TransientModel):
}
def action_open_robots(self):
self.website_id._force()
return {
'name': _("Robots.txt"),
'view_mode': 'form',
......
......@@ -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 {
......
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