[FIX] web: fix clickbot to enter studio
Since [1], the DOM of the studio icon has changed, and no longer matches the selector of the clickbot menu. As a consequence, it no longer entered Studio. This commit fixes the selector. [1] odoo/enterprise#9da0c9fab6c066aa97bc8cb99eb0e54b5a76a08f closes odoo/odoo#128040 X-original-commit: aba563c58ec890bbf33d4a7d3cc34e9b2a4012a0 Related: odoo/enterprise#43910 Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
"payment_odoo.menu_adyen_account",
|
||||
"payment_odoo.root_adyen_menu",
|
||||
];
|
||||
// If you change this selector, adapt Studio test "Studio icon matches the clickbot selector"
|
||||
const STUDIO_SYSTRAY_ICON_SELECTOR = ".o_web_studio_navbar_item:not(.o_disabled) i";
|
||||
|
||||
const { isEnterprise } = odoo.info;
|
||||
const { onWillStart } = owl;
|
||||
@@ -245,7 +247,7 @@
|
||||
if (!isStudioInstalled) {
|
||||
return;
|
||||
}
|
||||
const studioIcon = document.querySelector(".o_web_studio_navbar_item:not(.o_disabled) a i");
|
||||
const studioIcon = document.querySelector(STUDIO_SYSTRAY_ICON_SELECTOR);
|
||||
if (!studioIcon) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user