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

Hello,

I want to check for user email before sign up, I am just doing a simple rpc query to a function in models ( not controllers) to retrieve and see all the existing users. but Odoo blocks me with the popup on the right. Any idea about that ? Thanks





อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Thanks dude, actually i was missing a sudo(), that's it :)

อวตาร
ละทิ้ง

Hi!

Where did you put your sudo() ? In your JS file ?

ผู้เขียน

Hi Renaud, sorry cannot respond due to karma I think.

Sudo is performed in python file (models or controllers) in my case, it was in models, something like that: '...sudo().search[()]'.

BTW, you cannot do sudo in js.

ผู้เขียน

It's the other way :) "..sudo().search([])"

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

Hi,

Please check if template in which your js file is defined has inherit_id as

inherit_id="website.assets_frontend"


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 23
7909
0
พ.ค. 23
3175
1
ม.ค. 23
8001
2
ม.ค. 23
5304
0
ก.พ. 21
3436