تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
8465 أدوات العرض

Hello, I have a little question, in my odoo module I have a mail send function with a template for the users, but I use the message_post() function for generate a message in the dashboard, my problem is that the user receives 2 mails when I only want the mail with the template.


There is a way for self.message_post() don't send a email? Or there is a way for input a template inside self.message_post()


Thanks to everybody!!

الصورة الرمزية
إهمال
أفضل إجابة


Hello Jorge , 


If i understand your issue you don't want the notifications message to be send to the followers of the document you're sending , maybe this odoo context mixin will help you

  • mail_create_nosubscribe: at create or message_post, do not subscribe the current user to the record thread
  • tracking_disable: at create and write, perform no MailThread features (auto subscription, tracking, post, ..)

pass this context to your function using with_context (mail_create_nosubscribe=False,tracking_disable=False)


I hope this answer help you if not you can explain more your issue or add an excerpt from the code you have issue with.


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 15
4416
2
أبريل 23
6772
0
نوفمبر 22
2788
0
نوفمبر 18
2985
1
نوفمبر 17
39