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

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?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Add New Operation Type in Warehouse แก้ไขแล้ว
2
ธ.ค. 24
3667
1
พ.ย. 24
2370
2
เม.ย. 23
16596
4
ส.ค. 24
22864
0
ธ.ค. 21
1997