Skip to content

Commit

Permalink
[FIX] web_editor: save target change in ir_ui_view link
Browse files Browse the repository at this point in the history
Steps to reproduce the issue:
=============================
- Install website and events
- Go to events page and enable editor
- Click on customize and enable sidebar
- enable Follow us option
- Select a social media icon and enable open in a new window option
- Save
- Click on the updated icon, it still opens in the same page => the
  changes aren't saved.

Origin of the issue:
====================
The `target` attribute was ignored when saving and `arch_section`.

Solution
========
Add `target` attribute to the allowed root attrs.

opw-4077657

closes odoo#177269

X-original-commit: a0460d9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
  • Loading branch information
Mtaylorr committed Aug 21, 2024
1 parent 1ffcea3 commit b08bb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web_editor/models/ir_ui_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _are_archs_equal(self, arch1, arch2):

@api.model
def _get_allowed_root_attrs(self):
return ['style', 'class']
return ['style', 'class', 'target']

def replace_arch_section(self, section_xpath, replacement, replace_tail=False):
# the root of the arch section shouldn't actually be replaced as it's
Expand Down

0 comments on commit b08bb02

Please sign in to comment.