Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3985 Tampilan

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





Avatar
Buang
Penulis Jawaban Terbai

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

Avatar
Buang

Hi!

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

Penulis

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.

Penulis

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

Jawaban Terbai

Hi,

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

inherit_id="website.assets_frontend"


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mei 23
7464
0
Mei 23
2712
1
Jan 23
7498
2
Jan 23
4833
0
Feb 21
3183