Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5836 Näkymät

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.

Avatar
Hylkää
Paras vastaus

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!

Avatar
Hylkää
Tekijä

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?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
maalisk. 24
2076
1
heinäk. 25
589
2
toukok. 25
2642
5
toukok. 25
17988
0
huhtik. 25
1009