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

I am on odoo v15 CE.

I want to grant portal access to multiple customers at a single click. The present available option is requiring to click on Grant Access Button for every Customer. I have 2500 customers. Is there any way to get this done with a single click?

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

Hi,

To grant portal access to multiple customers, 

1)First change the Kanban view in to List view

2) Select the customers to give portal access

3) Action -> Grant portal access


Hope it helps

อวตาร
ละทิ้ง
ผู้เขียน

After doing the above another box pops up where separate button is there for Grant Access for each user.

คำตอบที่ดีที่สุด

Hi Faisal,

Yes you can customize using server action with executing python code selection.


portal_wizard = env['portal.wizard'].create({})


portal_wizard_users = portal_wizard.user_ids.filtered(lambda user: not user.is_portal and not user.is_internal)


if portal_wizard_users:

  for portal_wizard_user in portal_wizard_users:

    portal_wizard_user.action_grant_access()

    

message = 'Granted portal access to : %s contacts' % str(len(portal_wizard_users.ids))


log(message, level='info')


Check if this works for you! 



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 24
33
1
ก.ค. 23
3715
Sharing Documents with Portal users แก้ไขแล้ว
5
ก.ค. 25
9783
1
ก.ค. 24
2315
1
พ.ย. 24
1537