Odoo Help

0

0
1 Answer
2
Avatar

Ray Carnes United States

--Ray Carnes--
2829
| 5 2 8
Beaumont, United States
--Ray Carnes--

Business Analyst - Custom Projects

https://www.linkedin.com/in/raycarnes

Ray Carnes United States
10/17/18, 10:56 PM

An Automated Action (this example should work with v11 and v12) can combine the followers (this example adds ONLY followers who are Users) on the Sale Order and followers from the Customer:



Code to copy/paste:

partners_who_are_users = []
users = env['res.users'].search([])
for user in users:
partners_who_are_users.append(user.partner_id.id)

followers = []
for partner in record.partner_id.message_partner_ids.ids:
if partner in partners_who_are_users:
followers.append(partner)
record.message_subscribe(followers)
Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now