[FIX] hr: fix error on double click of chat user name
PURPOSE When opening the same form view 2 times in quick succession (e.g. clicking twice on the name of an employee from a chat window), there is a traceback SPECIFICATION It should open public employee form and not raise any error LINKS Task-2371687 PR https://github.com/odoo/odoo/pull/61457 closes odoo/odoo#61971 X-original-commit: 587ed5df5b542c6c6b3f13d1e348dd28d0da1f2c Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -27,7 +27,9 @@ odoo.define('hr.employee_chat', function (require) {
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
this.$el.find('.o_employee_chat_btn').off('click');
|
||||
if (this.$el) {
|
||||
this.$el.find('.o_employee_chat_btn').off('click');
|
||||
}
|
||||
return this._super();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user