You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
741 B

/** @odoo-module **/
import publicWidget from "@web/legacy/js/public/public_widget";
import { jsonrpc } from "@web/core/network/rpc_service";
import { useRef } from "@odoo/owl";
publicWidget.registry.add_attachment = publicWidget.Widget.extend({
selector: '.div-class-button',
events: {
'click #button_add_attachment_payment': 'AttachmentPaymentOnClick',
},
/**
For delete the attachments
**/
AttachmentPaymentOnClick: function (ev) {
var attachment_id = ev.target.closest('div')
jsonrpc("/shop/attachments" , {
"attachment_id":attachment_id.id
}).then(function (data) {
return
});
attachment_id.remove();
},
});