From bc8699ce48c3b326aa2ec787b9572071c3507dea Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 23 Nov 2023 13:16:48 +0100 Subject: [PATCH] [FIX] theme_*: fix linter error for runbot build There is a linter error in the modified files of this PR about `require` not defined. It's actually not really a problem as those files are transcompiled from ES6 module to odoo module, injecting `require` before the file is actually used/read by the browser, at which point no issue actually arise. Those linter error were introduced with PR [1] in Odoo 15 but were fix in Odoo 16 with commit [2] (which should have arguably be done in Odoo 15). [1]: https://github.com/odoo/design-themes/pull/500 [2]: https://github.com/odoo/design-themes/commit/dc2f5112022b5f987ed418e04b5e15c93dc7a731 closes odoo/design-themes#748 X-original-commit: 08e5adc2652c126933e4992a173d804593ec18fd Signed-off-by: Christophe Monniez (moc) Signed-off-by: Romain Derie (rde) --- theme_artists/static/src/js/tour.js | 3 --- theme_aviato/static/src/js/tour.js | 4 +--- theme_bewise/static/src/js/tour.js | 5 ++--- theme_bookstore/static/src/js/tour.js | 4 +--- theme_clean/static/src/js/tour.js | 4 +--- theme_enark/static/src/js/tour.js | 3 --- theme_graphene/static/src/js/tour.js | 4 ---- theme_kiddo/static/src/js/tour.js | 5 ++--- theme_notes/static/src/js/tour.js | 4 +--- theme_odoo_experts/static/src/js/tour.js | 4 +--- theme_orchid/static/src/js/tour.js | 4 +--- theme_vehicle/static/src/js/tour.js | 4 ---- 12 files changed, 10 insertions(+), 38 deletions(-) diff --git a/theme_artists/static/src/js/tour.js b/theme_artists/static/src/js/tour.js index 23120c638..f2190f72b 100644 --- a/theme_artists/static/src/js/tour.js +++ b/theme_artists/static/src/js/tour.js @@ -2,9 +2,6 @@ import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_carousel_wrapper', diff --git a/theme_aviato/static/src/js/tour.js b/theme_aviato/static/src/js/tour.js index 03fb523be..0fa65b98b 100644 --- a/theme_aviato/static/src/js/tour.js +++ b/theme_aviato/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_cover', diff --git a/theme_bewise/static/src/js/tour.js b/theme_bewise/static/src/js/tour.js index b15454dbf..c087c1afb 100644 --- a/theme_bewise/static/src/js/tour.js +++ b/theme_bewise/static/src/js/tour.js @@ -1,8 +1,7 @@ /** @odoo-module */ -import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; +import { _t } from 'web.core'; +import wTourUtils from 'website.tour_utils'; const snippets = [ { diff --git a/theme_bookstore/static/src/js/tour.js b/theme_bookstore/static/src/js/tour.js index 3558cb966..50cc99560 100644 --- a/theme_bookstore/static/src/js/tour.js +++ b/theme_bookstore/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_cover', diff --git a/theme_clean/static/src/js/tour.js b/theme_clean/static/src/js/tour.js index d1790744d..27e0ae05b 100644 --- a/theme_clean/static/src/js/tour.js +++ b/theme_clean/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_cover', diff --git a/theme_enark/static/src/js/tour.js b/theme_enark/static/src/js/tour.js index a5fdc1924..168efdd7f 100644 --- a/theme_enark/static/src/js/tour.js +++ b/theme_enark/static/src/js/tour.js @@ -1,10 +1,7 @@ odoo.define("theme_enark.tour.enark", function (require) { "use strict"; -const core = require("web.core"); -const _t = core._t; const wTourUtils = require("website.tour_utils"); -var tour = require("web_tour.tour"); const snippets = [ { diff --git a/theme_graphene/static/src/js/tour.js b/theme_graphene/static/src/js/tour.js index 89e9869af..073abcc16 100644 --- a/theme_graphene/static/src/js/tour.js +++ b/theme_graphene/static/src/js/tour.js @@ -1,11 +1,7 @@ odoo.define("theme_graphene.tour.graphene", function (require) { "use strict"; -const core = require("web.core"); -const _t = core._t; - const wTourUtils = require("website.tour_utils"); -var tour = require("web_tour.tour"); const snippets = [ { diff --git a/theme_kiddo/static/src/js/tour.js b/theme_kiddo/static/src/js/tour.js index b34d48e01..6dbee4c0c 100644 --- a/theme_kiddo/static/src/js/tour.js +++ b/theme_kiddo/static/src/js/tour.js @@ -1,8 +1,7 @@ /** @odoo-module */ -import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; +import { _t } from 'web.core'; +import wTourUtils from 'website.tour_utils'; const snippets = [ { diff --git a/theme_notes/static/src/js/tour.js b/theme_notes/static/src/js/tour.js index 4ba579657..817679b6b 100644 --- a/theme_notes/static/src/js/tour.js +++ b/theme_notes/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_carousel', diff --git a/theme_odoo_experts/static/src/js/tour.js b/theme_odoo_experts/static/src/js/tour.js index d4d6f4ef4..1d079fe16 100644 --- a/theme_odoo_experts/static/src/js/tour.js +++ b/theme_odoo_experts/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_cover', diff --git a/theme_orchid/static/src/js/tour.js b/theme_orchid/static/src/js/tour.js index d951ce520..ae85c83ec 100644 --- a/theme_orchid/static/src/js/tour.js +++ b/theme_orchid/static/src/js/tour.js @@ -1,10 +1,8 @@ /** @odoo-module */ +import { _t } from 'web.core'; import wTourUtils from 'website.tour_utils'; -const core = require("web.core"); -const _t = core._t; - const snippets = [ { id: 's_cover', diff --git a/theme_vehicle/static/src/js/tour.js b/theme_vehicle/static/src/js/tour.js index 0bce8c722..869cd05e7 100644 --- a/theme_vehicle/static/src/js/tour.js +++ b/theme_vehicle/static/src/js/tour.js @@ -1,11 +1,7 @@ odoo.define("theme_vehicle.tour.vehicle", function (require) { "use strict"; -const core = require("web.core"); -const _t = core._t; - const wTourUtils = require("website.tour_utils"); -var tour = require("web_tour.tour"); const snippets = [ {