Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4106 Widoki

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





Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć

Hi!

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

Autor

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.

Autor

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

Najlepsza odpowiedź

Hi,

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

inherit_id="website.assets_frontend"


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 23
7552
0
maj 23
2784
1
sty 23
7581
2
sty 23
4901
0
lut 21
3207