From f103a3807761ccb96954f7522bfc12633c2bcf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedas=20=C5=BDilinskas?= Date: Thu, 24 Mar 2022 12:57:31 +0200 Subject: [PATCH] web_search_with_and: Migration to 15.0 --- web_search_with_and/__manifest__.py | 9 ++++++-- web_search_with_and/readme/CONTRIBUTORS.rst | 1 + .../src/js/control_panel_model_extension.js | 3 ++- .../static/src/js/search_bar.js | 3 ++- web_search_with_and/views/assets.xml | 21 ------------------- 5 files changed, 12 insertions(+), 25 deletions(-) delete mode 100644 web_search_with_and/views/assets.xml diff --git a/web_search_with_and/__manifest__.py b/web_search_with_and/__manifest__.py index 53c101755..69bf15892 100644 --- a/web_search_with_and/__manifest__.py +++ b/web_search_with_and/__manifest__.py @@ -4,11 +4,16 @@ { "name": "Use AND conditions on omnibar search", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "author": "Versada UAB, ACSONE SA/NV, Serincloud, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "web", "website": "https://github.com/OCA/web", "depends": ["web"], - "data": ["views/assets.xml"], + "assets": { + "web.assets_backend": [ + "/web_search_with_and/static/src/js/control_panel_model_extension.js", + "/web_search_with_and/static/src/js/search_bar.js", + ], + }, } diff --git a/web_search_with_and/readme/CONTRIBUTORS.rst b/web_search_with_and/readme/CONTRIBUTORS.rst index fad3aabbb..1974f3958 100644 --- a/web_search_with_and/readme/CONTRIBUTORS.rst +++ b/web_search_with_and/readme/CONTRIBUTORS.rst @@ -4,3 +4,4 @@ * Numigi (tm) and all its contributors (https://bit.ly/numigiens) * Souheil Bejaoui * Pedro Guirao +* Nedas Žilinskas diff --git a/web_search_with_and/static/src/js/control_panel_model_extension.js b/web_search_with_and/static/src/js/control_panel_model_extension.js index 67f2d7db5..6e8ef6c32 100644 --- a/web_search_with_and/static/src/js/control_panel_model_extension.js +++ b/web_search_with_and/static/src/js/control_panel_model_extension.js @@ -8,8 +8,9 @@ odoo.define( ControlPanelModelExtension: require("web/static/src/js/control_panel/control_panel_model_extension.js"), }; + const patchObject = components.ControlPanelModelExtension.prototype; patch( - components.ControlPanelModelExtension, + patchObject, "web_search_with_and/static/src/js/control_panel_model_extension.js", { addAutoCompletionValues({ diff --git a/web_search_with_and/static/src/js/search_bar.js b/web_search_with_and/static/src/js/search_bar.js index a12912057..005d53a57 100644 --- a/web_search_with_and/static/src/js/search_bar.js +++ b/web_search_with_and/static/src/js/search_bar.js @@ -6,7 +6,8 @@ odoo.define("web_search_with_and/static/src/js/search_bar.js", function (require SearchBar: require("web.SearchBar"), }; - patch(components.SearchBar, "web_search_with_and/static/src/js/search_bar.js", { + const patchObject = components.SearchBar.prototype; + patch(patchObject, "web_search_with_and/static/src/js/search_bar.js", { /** * @private * @param {Object} source diff --git a/web_search_with_and/views/assets.xml b/web_search_with_and/views/assets.xml deleted file mode 100644 index c34251868..000000000 --- a/web_search_with_and/views/assets.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - -