Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4695 Lượt xem

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.


Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 25
1693
0
thg 12 24
1640
2
thg 12 24
2732
0
thg 11 24
3372
3
thg 5 24
2259