Allow optional disable automatic followers (for all modules) functionality in base.config.settings
- This overrides corresponding files in base mail module.
- Works for Odoo V8.0.
The fix is an enhanced/simplified version of this module: https://apps.odoo.com/apps/modules/8.0/sale_disable_auto_followers/
- Simply download and install the addon into your odoo instance (make sure that it overrides base mail module in the install process).
- Toggle “Disable Followers Functionality” in General Settings.
- Play with modules like sale.order that originally have followers functionality.
Extend mail.thread model to override required functions (i.e. inherited mail.thread → name mail.thread)
The functions are/might not be called.
For example:
-
This is the intended effect: sale.order → my inherited mail.thread → name mail.thread
-
However my inherited mail.thread is not called.
-
The actual chain is:
a. sale.order → name mail.thread
b. my inherited mail.thread → name mail.thread
-
Workaround that is not recommended but can work:
a. add depends “my inherited mail.thread module” in manifest file of product module (since product inherits directly from mail module)
-
Note: although point 4 works because of our knowledge that function calls are based on module loading order (“depends” key), it is actually a bug that is fixed after odoo v8.
a. Meaning, model extensions should actually be effective in children models.
i. In our example, the model extension is “my inherited mail.thread”. The child model is the child of “name mail.thread”, which is “sale.order”.
b. Refer to:
ii. odoo/odoo#9084
- Use the given module above. Replicate for other affected modules 1 by 1.
-
Copy related mail module files.
-
Add flag in ir.config_parameter
-
If flag true, disable followers functionality in related mail module functions.
Simply pass a context key to the only 2 locations where a user can manually add followers: “Follow” and “Add Others” buttons.