[FIX] attachment_preview: start needs to return a promise

This commit is contained in:
Holger Brunn 2021-04-30 12:02:14 +02:00 committed by Houzéfa Abbasbhay
parent 367822a9b4
commit c8a7521e45
No known key found for this signature in database
GPG Key ID: B30E9425D9198EC1

View File

@ -328,8 +328,10 @@ odoo.define('attachment_preview', function (require) {
},
start: function () {
this._super.apply(this, arguments);
this.attachmentPreviewWidget.insertAfter(this.$el);
var self = this;
return this._super.apply(this, arguments).then(function () {
return self.attachmentPreviewWidget.insertAfter(self.$el);
});
},
_attachmentPreviewWidgetHidden: function () {