Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5834 มุมมอง

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 24
2076
1
ก.ค. 25
585
2
พ.ค. 25
2641
5
พ.ค. 25
17984
0
เม.ย. 25
1009