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

hi,

I send an emails from odoo but i dont want them to be visible in the chatter section of the record. The sending part is fine, but i did not find a solution to ignore it in the chatter. i hope i dont have to dig through all the source.

thanks.


الصورة الرمزية
إهمال

is it applicable only on the current/active model where you trigger the send email?

الكاتب

no, i dont get emails in chatter everywhere. but maybe you could filter based on "args".
by the way, the method is not called "_search" anymore, its just "search".

الكاتب أفضل إجابة

i found a solution by hiding all messages of type email. i overriden the following in mail.message:
def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
args.append(('message_type', '!=', 'email'))
res = super(LrzMessage, self)._search(args, offset, limit, order, count, access_rights_uid)
return res

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

Hello.

To remove link between message and chatter you can remove the res_id (Related Document ID) property of the email after sending.

If email has no res_id it is not showed in chatter.

الصورة الرمزية
إهمال
الكاتب

thank you. i will have to try if it somehow works if there is a report attached.

الكاتب

it seems that i need res_id for the report.
does someone know in which model a mail.message is created from the email?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
فبراير 25
1561
0
ديسمبر 24
1538
2
ديسمبر 24
2539
0
نوفمبر 24
1766
3
مايو 24
2114