itpp-labs / mail-addons

Odoo Mail Addons
https://itpp.dev
57 stars 191 forks source link

mail_base breaks all other modules which use bus notification #371

Open alex2grad opened 2 years ago

alex2grad commented 2 years ago

Need to remove bus.off('notification'); from mail_base/static/lib/base.js

Calling .off() with no arguments removes all handlers attached to the bus

yelizariev commented 2 years ago

Just removing will break the mail_base module...

alex2grad commented 2 years ago

No, removing it breaks nothing. I checked. Why do you think it breaks mail_base?

If you want to remove mail_base's event you should provide the selector and event arguments.

https://api.jquery.com/off/

yelizariev commented 2 years ago

I mean that is was added by a purpose. As I remember, it's needed because we copy-pasted code from original mail module and without .off() we'd have duplicates fo the handler. We can take a look, if you make a PR