mirror of https://github.com/OCA/web.git
[MIG] web_drop_target: Migration to 14.0
parent
5493189ea7
commit
3cf3ed9c66
|
@ -25,11 +25,7 @@ Drop target support
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
This module extends the functionality of the web client to support dropping local files into the web client.
|
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.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
**Table of contents**
|
**Table of contents**
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
{
|
{
|
||||||
"name": "Drop target support",
|
"name": "Drop target support",
|
||||||
"version": "13.0.1.1.1",
|
"version": "14.0.1.0.0",
|
||||||
"author": "Therp BV,Odoo Community Association (OCA)",
|
"author": "Therp BV,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
This module extends the functionality of the web client to support dropping local files into the web client.
|
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.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
|
@ -78,7 +78,6 @@ odoo.define("web_drop_target", function (require) {
|
||||||
|
|
||||||
_create_attachment: function (file, reader, e, res_model, res_id, extra_data) {
|
_create_attachment: function (file, reader, e, res_model, res_id, extra_data) {
|
||||||
// Helper to upload an attachment and update the sidebar
|
// Helper to upload an attachment and update the sidebar
|
||||||
var self = this;
|
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: "ir.attachment",
|
model: "ir.attachment",
|
||||||
method: "create",
|
method: "create",
|
||||||
|
@ -95,15 +94,6 @@ odoo.define("web_drop_target", function (require) {
|
||||||
extra_data || {}
|
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();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue