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

Hi, 

I'm creating a task by code as following:

self.env['project.task'].create(vals)

and I want to disable the e-mail notification for this creation. 

I tried to add with_context(mail_notrack=True) but it didn't work as well.


Ps: I don't want to disable all e-mail notifications for users.

아바타
취소
베스트 답변

Hi,

Just add the context tracking_disable=True at create or write, to perform no MailThread features (auto subscription, tracking, post, ...) and add a condition for which user you want to use "tracking_disable=True".

e.g.:

self.env['project.task'].with_context(tracking_disable=True).create(values)

Best regards!

아바타
취소
작성자

thanks!

Not a programmer here but trying to add some python code through automated action. Is this achievable withing automated action in web? is there a way to add update instead of create?

관련 게시물 답글 화면 활동
2
3월 24
2215
1
7월 25
846
2
5월 25
2769
5
5월 25
18280
0
4월 25
1149