From c65ed97d5ced542a114c2a17361dc46014e76407 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 30 Apr 2021 12:02:14 +0200 Subject: [PATCH] [FIX] attachment_preview: start needs to return a promise --- attachment_preview/static/src/js/attachment_preview.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/attachment_preview/static/src/js/attachment_preview.js b/attachment_preview/static/src/js/attachment_preview.js index 865e1f04..85413877 100644 --- a/attachment_preview/static/src/js/attachment_preview.js +++ b/attachment_preview/static/src/js/attachment_preview.js @@ -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 () {