diff --git a/web_drop_target/__manifest__.py b/web_drop_target/__manifest__.py index e34587e80..009dfa047 100644 --- a/web_drop_target/__manifest__.py +++ b/web_drop_target/__manifest__.py @@ -2,13 +2,20 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Drop target support", - "version": "14.0.1.0.1", + "version": "15.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "license": "AGPL-3", "category": "Usability", "summary": "Allows to drag files into Odoo", "depends": ["web"], - "data": ["views/templates.xml"], - "qweb": ["static/src/xml/widgets.xml"], + "data": [], + "assets": { + "web.assets_backend": [ + "web_drop_target/static/lib/base64js.min.js", + "web_drop_target/static/src/js/web_drop_target.js", + "web_drop_target/static/src/scss/web_drop_target.scss", + ], + "web.assets_qweb": ["web_drop_target/static/src/xml/widgets.xml"], + }, } diff --git a/web_drop_target/static/src/js/web_drop_target.js b/web_drop_target/static/src/js/web_drop_target.js index a12da649f..a23d95473 100644 --- a/web_drop_target/static/src/js/web_drop_target.js +++ b/web_drop_target/static/src/js/web_drop_target.js @@ -5,7 +5,7 @@ odoo.define("web_drop_target", function (require) { "use strict"; - const ActionManager = require("web.ActionManager"); + const AbstractAction = require("web.AbstractAction"); const FormController = require("web.FormController"); const core = require("web.core"); const qweb = core.qweb; @@ -152,10 +152,10 @@ odoo.define("web_drop_target", function (require) { */ _onBodyFileDragover: function (ev) { ev.preventDefault(); - const actionManager = this.findAncestor(function (ancestor) { - return ancestor instanceof ActionManager; + const abstractAction = this.findAncestor(function (ancestor) { + return ancestor instanceof AbstractAction; }); - const controller = actionManager.currentDialogController; + const controller = abstractAction.currentDialogController; if ( _.isEmpty(this._get_drop_items(ev)) && this._checkDragOver() && diff --git a/web_drop_target/views/templates.xml b/web_drop_target/views/templates.xml deleted file mode 100644 index 4517d0072..000000000 --- a/web_drop_target/views/templates.xml +++ /dev/null @@ -1,23 +0,0 @@ - - -