diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-08-10 10:39:36 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-08-21 14:16:33 +0000 |
| commit | 79f6b15c747a7ce9bf3d3415c569feda4da85323 (patch) | |
| tree | 1ad8fbe037963cf40d52db5fbe0ad6aaa8646410 /addons/mail/static/src/models/user/user.js | |
| parent | 01aa711d413040af5edc9cb872e72a500cfa641d (diff) | |
[FIX] mail: avoid unnecessary update of inverse in JS models
Part of task-2308312
X-original-commit: 0e08e43decf18108d25d051ad76c093bcdf434db
Diffstat (limited to 'addons/mail/static/src/models/user/user.js')
| -rw-r--r-- | addons/mail/static/src/models/user/user.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/static/src/models/user/user.js b/addons/mail/static/src/models/user/user.js index 20495e25aa1..b9bc72bf987 100644 --- a/addons/mail/static/src/models/user/user.js +++ b/addons/mail/static/src/models/user/user.js @@ -11,13 +11,13 @@ function factory(dependencies) { /** * @override */ - delete() { + _willDelete() { if (this.env.messaging) { if (this === this.env.messaging.currentUser) { - this.env.messaging.update({ currentUser: [['unlink-all']] }); + this.env.messaging.update({ currentUser: [['unlink']] }); } } - super.delete(); + return super._willDelete(...arguments); } //---------------------------------------------------------------------- |
