mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] hibou_professional: rendering before ready
This commit is contained in:
@@ -21,6 +21,7 @@ var HibouProfessionalSystrayWidget = Widget.extend({
|
|||||||
self.is_admin = false;
|
self.is_admin = false;
|
||||||
self.allow_admin_message = false;
|
self.allow_admin_message = false;
|
||||||
self.allow_message = false;
|
self.allow_message = false;
|
||||||
|
self._has_rendered = false;
|
||||||
this._rpc({
|
this._rpc({
|
||||||
model: 'publisher_warranty.contract',
|
model: 'publisher_warranty.contract',
|
||||||
method: 'hibou_professional_status',
|
method: 'hibou_professional_status',
|
||||||
@@ -244,7 +245,9 @@ var HibouProfessionalSystrayWidget = Widget.extend({
|
|||||||
this.$('.hibou_message_form_container').on('click', function (e) {
|
this.$('.hibou_message_form_container').on('click', function (e) {
|
||||||
//e.preventDefault();
|
//e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
})
|
});
|
||||||
|
|
||||||
|
this._has_rendered = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleStatusUpdate: function(status) {
|
handleStatusUpdate: function(status) {
|
||||||
@@ -261,7 +264,9 @@ var HibouProfessionalSystrayWidget = Widget.extend({
|
|||||||
this.is_admin = status.is_admin;
|
this.is_admin = status.is_admin;
|
||||||
this.allow_admin_message = status.allow_admin_message;
|
this.allow_admin_message = status.allow_admin_message;
|
||||||
this.allow_message = status.allow_message;
|
this.allow_message = status.allow_message;
|
||||||
this.renderElement();
|
if (this._has_rendered) {
|
||||||
|
this.renderElement();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user