コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4497 ビュー

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
2月 25
1493
0
12月 24
1510
2
12月 24
2466
0
11月 24
1411
3
5月 24
2074