Skip to content

Commit

Permalink
[FIX] cmis_web: fix rendering of FieldCmisDocument
Browse files Browse the repository at this point in the history
In some cases the render gets triggered a second time and the empty value
becomes false again. This causes the wrong template to be rendered and creates
an error.
  • Loading branch information
jdoutreloux committed Aug 16, 2023
1 parent 9f94988 commit b069816
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmis_web/static/src/js/form_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,12 @@ odoo.define('cmis_web.form_widgets', function (require) {

_render: function () {
this._super.apply(this, arguments);
if (this.value === "empty") {
this._renderNoDocument();
} else if (this.value === "__error__") {
if (this.value === "__error__") {
this._renderGetError();
} else if (this.document) {
} else if (this.value && this.value !== "empty" && this.document) {
this._renderCmisDocument(this.document);
} else {
this._renderNoDocument();
}

this.$el.find('.dropdown-menu').off('mouseleave');
Expand Down

0 comments on commit b069816

Please sign in to comment.