Skip to content

Commit e50cc50

Browse files
committed
[FIX] test_themes: adapt switcher tooltip format
This adapts the WebsiteSwitcherSystray's DropdownItem tooltips dataset to the changed API brought in the community repository. closes #765 Task: 3266145 Related: odoo/enterprise#48452 Related: odoo/odoo#137691 Signed-off-by: Aaron Bohy (aab) <[email protected]>
1 parent 1d47f8a commit e50cc50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test_themes/static/src/systray_items/website_switcher.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ patch(WebsiteSwitcherSystray.prototype, {
1818
const themesWebsites = await this.orm.call('website', 'get_test_themes_websites_theme_preview');
1919
for (const themeId in themesWebsites) {
2020
this.tooltips[themeId] = {
21-
tooltipTemplate: 'test_themes.ThemeTooltip',
22-
tooltipPosition: 'left',
23-
tooltipDelay: 100,
24-
tooltipInfo: JSON.stringify({url: themesWebsites[themeId]}),
21+
"data-tooltip-template": 'test_themes.ThemeTooltip',
22+
"data-tooltip-position": 'left',
23+
"data-tooltip-delay": 100,
24+
"data-tooltip-info": JSON.stringify({url: themesWebsites[themeId]}),
2525
};
2626
}
2727
});

test_themes/static/src/systray_items/website_switcher.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<t t-name="test_themes.WebsiteSwitcherSystray" t-inherit="website.WebsiteSwitcherSystray" t-inherit-mode="extension">
88
<xpath expr="//DropdownItem" position="attributes">
9-
<attribute name="dataset">this.tooltips[element.id]</attribute>
9+
<attribute name="attrs">this.tooltips[element.id]</attribute>
1010
</xpath>
1111
<!-- With this module installed, disable the warning -->
1212
<xpath expr="//DropdownItem/t[@t-if='!element.domain']" position="replace">

0 commit comments

Comments
 (0)