Skip to content

Commit

Permalink
[FIX] test_themes: adapt switcher tooltip format
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
brboi committed Feb 7, 2024
1 parent 1d47f8a commit e50cc50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test_themes/static/src/systray_items/website_switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ patch(WebsiteSwitcherSystray.prototype, {
const themesWebsites = await this.orm.call('website', 'get_test_themes_websites_theme_preview');
for (const themeId in themesWebsites) {
this.tooltips[themeId] = {
tooltipTemplate: 'test_themes.ThemeTooltip',
tooltipPosition: 'left',
tooltipDelay: 100,
tooltipInfo: JSON.stringify({url: themesWebsites[themeId]}),
"data-tooltip-template": 'test_themes.ThemeTooltip',
"data-tooltip-position": 'left',
"data-tooltip-delay": 100,
"data-tooltip-info": JSON.stringify({url: themesWebsites[themeId]}),
};
}
});
Expand Down
2 changes: 1 addition & 1 deletion test_themes/static/src/systray_items/website_switcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

0 comments on commit e50cc50

Please sign in to comment.