Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2143 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 24
4089
1
thg 11 24
2862
2
thg 4 23
17599
4
thg 8 24
23643
0
thg 12 21
2358