[FIX] web_editor: update displayed media in dialog on remove media

closes odoo/odoo#30809
This commit is contained in:
Antoine Guenet
2019-02-04 12:52:15 +00:00
parent f834204af3
commit 275af90b38
@@ -561,10 +561,10 @@ var ImageWidget = MediaWidget.extend({
var self = this;
Dialog.confirm(this, _t("Are you sure you want to delete this file ?"), {
confirm_callback: function () {
var $helpBlock = this.$('.form-text').empty();
var $helpBlock = self.$('.form-text').empty();
var $a = $(ev.currentTarget);
var id = parseInt($a.data('id'), 10);
var attachment = _.findWhere(this.records, {id: id});
var attachment = _.findWhere(self.records, {id: id});
return self._rpc({
route: '/web_editor/attachment/remove',
params: {