Odoo Help

Welcome!

This community 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.

1

How do I prevent emails from particular models ?

By
Emipro Technologies Pvt. Ltd.
on 3/10/15, 8:26 AM 676 views

Hello All,

By default if I don't want to receive any email then I can go to my user preference & select "Never" to following option,

"Receive Inbox Notifications by Email"

But If I want to restrict email for particular models only then ?

For example, I don't want emails which are coming to me against "project.task" model. 

All Odoo developers know that mails are coming from "message_post" method of mail.thread class. Now in that I can get a particular model against emails are being send to users. At that time do you suggest that I do some custom code and restrict users to have emails on unwanted models. 

However I am thinking to add Many2Many field in user's preference where as user can select unwanted models from email. And that will be only visible in case of If i didn't selected "Never" Option in "Receive Inbox Notifications by Email" setting.

Let me know your thoughts,

0

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
896
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.

https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile

tibrahim@2p.com.sa

Tarek Mohamed Ibrahim
On 8/14/15, 3:59 PM

I think 'Never' works as an 'if' condition as follows

if not 'Never':
receive emails

your suggestion goes as follows

if not 'Never':
get the model of the incoming email
check if this model included in the prevented list, :
then ignore this email

So, I think that this reasoning is good and could be applied, go ahead.


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/10/15, 8:26 AM
Seen: 676 times
Last updated: 4/12/16, 1:19 AM