diff options
| author | Priyanka Kakadiya <pka@odoo.com> | 2020-11-06 06:03:57 +0000 |
|---|---|---|
| committer | Priyanka Kakadiya <pka@odoo.com> | 2020-11-17 06:43:20 +0000 |
| commit | 587ed5df5b542c6c6b3f13d1e348dd28d0da1f2c (patch) | |
| tree | 8e7997a44862c1247e1f2439def4d91bc55949ab /addons/hr/static/src | |
| parent | 49acaa4f5bf6ce48dec9285d4acce70a7d940d42 (diff) | |
[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#61457
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/hr/static/src')
| -rw-r--r-- | addons/hr/static/src/js/chat.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/hr/static/src/js/chat.js b/addons/hr/static/src/js/chat.js index 0489ccceac0..9bae9d57d41 100644 --- a/addons/hr/static/src/js/chat.js +++ b/addons/hr/static/src/js/chat.js @@ -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(); }, |
