[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 anusrinps96
parent 8d8ebf7269
commit 7369927ffe
3 changed files with 6 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ Authors
Contributors
~~~~~~~~~~~~
* Holger Brunn <hbrunn@therp.nl>
* Holger Brunn <mail@hunki-enterprises.com>
* Dennis Sluijk <d.sluijk@onestein.nl>
Other credits

View File

@@ -1,2 +1,2 @@
* Holger Brunn <hbrunn@therp.nl>
* Holger Brunn <mail@hunki-enterprises.com>
* Dennis Sluijk <d.sluijk@onestein.nl>

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 () {