Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2441 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
dic 24
4401
1
nov 24
3180
2
abr 23
18181
4
ago 24
24281
0
dic 21
2498