Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Send an email from odoo, but dont add it to the record's chatter section

Avatar
odoo
2 Comments
Avatar
Discard
Avatar
odoo
-

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

Avatar
odoo
-

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".

2 Answers
0
Avatar
odoo
Best Answer

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

Avatar
Discard
0
Avatar
odoo
Best Answer

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.

2 Comments
Avatar
Discard
Avatar
odoo
-

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

Avatar
odoo
-

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