Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2383 Zobrazení

I am creating a user in the archived state using python code. But after creating the user, the system sends invitations and other emails to this user. How is it happening even if the user is disabled?

Avatar
Zrušit
Nejlepší odpověď

Hi,

Archiving the user will not stop sending emails to the user. By default when we create a user the selection field notification_type in res.users will be set to emails. You can update this field value to inbox in order to handle the acknowledgments within odoo.

Try the below code, 

self.env['res.users'].create({
'name': 'test user',
'login'
: 'test',
'email'
: 'p.p@example.com',
'notification_type'
: 'inbox',})

Thanks

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
pro 24
4347
1
lis 24
3089
2
dub 23
18096
4
srp 24
24155
0
pro 21
2452