콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4612 화면

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
1619
0
12월 24
1581
2
12월 24
2626
0
11월 24
2780
3
5월 24
2199