7910723d36e5f0a8abf6da4c5b5e53b4c5e91c0a
Issue
- Install Contacts
- Technical / Email / Subtypes / Discussions
- Uncheck Default
- Go on any contact
- Add an user as follower
- Edit the follower, check any box
- Save
- Re-edit for checking
Not saved
Cause
In mail_followers.py _add_followers method
We do:
```py
new_sids = set(channel_subtypes[channel_id]) - set(sids)
old_sids = set(sids) - set(channel_subtypes[channel_id])
```
If no box are checked, sids value will be [None] instead
of [] (_get_subscription_data) so, new_sids and old_sids
will have a value but old_sids should not, it override
the change we made
We have [None] value because in _get_subscription_data
we use array_agg which returns a list or None if there
are no input rows
Solution
Compute old_sids if sids is not [None]
OPW-2271472
closes odoo/odoo#52869
X-original-commit: b1cdef0272a797fe2c1e5e0634ff400d17480d85
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%