From 3cf3ed9c666bc9f57bb04e065ce23bc2670dbf1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 6 Apr 2021 12:59:55 +0200 Subject: [PATCH] [MIG] web_drop_target: Migration to 14.0 --- web_drop_target/README.rst | 6 +----- web_drop_target/__manifest__.py | 2 +- web_drop_target/readme/DESCRIPTION.rst | 6 +----- web_drop_target/static/src/js/web_drop_target.js | 10 ---------- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/web_drop_target/README.rst b/web_drop_target/README.rst index 6a01926fc..559a4f668 100644 --- a/web_drop_target/README.rst +++ b/web_drop_target/README.rst @@ -25,11 +25,7 @@ Drop target support |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends the functionality of the web client to support dropping local files into the web client. - -By default, an attachment will be created when dropping a file on a form. - -Further, this module is meant as a base drag&drop module supporting other actions after some file is dropped so that other modules can add more features. +This module is meant as a base drag&drop module supporting other actions after some file is dropped so that other modules can add more features. **Table of contents** diff --git a/web_drop_target/__manifest__.py b/web_drop_target/__manifest__.py index b9062bdff..949fba48e 100644 --- a/web_drop_target/__manifest__.py +++ b/web_drop_target/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Drop target support", - "version": "13.0.1.1.1", + "version": "14.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "license": "AGPL-3", diff --git a/web_drop_target/readme/DESCRIPTION.rst b/web_drop_target/readme/DESCRIPTION.rst index 0701cee01..4b4a6145d 100644 --- a/web_drop_target/readme/DESCRIPTION.rst +++ b/web_drop_target/readme/DESCRIPTION.rst @@ -1,5 +1 @@ -This module extends the functionality of the web client to support dropping local files into the web client. - -By default, an attachment will be created when dropping a file on a form. - -Further, this module is meant as a base drag&drop module supporting other actions after some file is dropped so that other modules can add more features. +This module is meant as a base drag&drop module supporting other actions after some file is dropped so that other modules can add more features. 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 70b216066..4bcb3a537 100644 --- a/web_drop_target/static/src/js/web_drop_target.js +++ b/web_drop_target/static/src/js/web_drop_target.js @@ -78,7 +78,6 @@ odoo.define("web_drop_target", function (require) { _create_attachment: function (file, reader, e, res_model, res_id, extra_data) { // Helper to upload an attachment and update the sidebar - var self = this; return this._rpc({ model: "ir.attachment", method: "create", @@ -95,15 +94,6 @@ odoo.define("web_drop_target", function (require) { extra_data || {} ), ], - }).then(function () { - // Find the chatter among the children, there should be only - // one - var res = _.filter(self.getChildren(), "chatter"); - if (res.length) { - res[0].chatter._reloadAttachmentBox(); - res[0].chatter.trigger_up("reload"); - res[0].chatter.$(".o_chatter_button_attachment").click(); - } }); },