mirror of https://github.com/OCA/web.git
[FIX] web_responsive: Make showAppsMenuItem work again
In Odoo 17, the Class TourStepUtils was removed, and stepUtils is now an object instead of a class. When this module is installed, the tours stop working and throw the error: Uncaught Error: Dependencies should be defined by an array: function (require) {. This commit adapts the code to align with these changes, ensuring that tours work correctly.pull/3069/head
parent
0fe05481cf
commit
50c8ade99e
|
@ -16,7 +16,7 @@
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"installable": True,
|
"installable": True,
|
||||||
"depends": ["web", "mail"],
|
"depends": ["web_tour", "mail"],
|
||||||
"development_status": "Production/Stable",
|
"development_status": "Production/Stable",
|
||||||
"maintainers": ["Tardo", "SplashS"],
|
"maintainers": ["Tardo", "SplashS"],
|
||||||
"excludes": ["web_enterprise"],
|
"excludes": ["web_enterprise"],
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
/* Copyright 2021 ITerra - Sergey Shebanin
|
/* Copyright 2021 ITerra - Sergey Shebanin
|
||||||
|
* Copyright 2025 Carlos Lopez - Tecnativa
|
||||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||||
odoo.define("web_responsive.test_patch", function (require) {
|
odoo.define(
|
||||||
"use strict";
|
"web_responsive.test_patch",
|
||||||
|
["@web_tour/tour_service/tour_utils", "@web/core/utils/patch"],
|
||||||
|
function (require) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const utils = require("web_tour.TourStepUtils");
|
const {stepUtils} = require("@web_tour/tour_service/tour_utils");
|
||||||
|
const {patch} = require("@web/core/utils/patch");
|
||||||
|
|
||||||
/* Make base odoo JS tests working */
|
patch(stepUtils, {
|
||||||
utils.include({
|
/* Make base odoo JS tests working */
|
||||||
showAppsMenuItem() {
|
showAppsMenuItem() {
|
||||||
return {
|
return {
|
||||||
edition: "community",
|
edition: "community",
|
||||||
trigger: ".o_navbar_apps_menu",
|
trigger: "button.o_grid_apps_menu__button",
|
||||||
auto: true,
|
auto: true,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue