Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4438 Näkymät

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
Hylkää
Tekijä Paras vastaus

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

Avatar
Hylkää

Hi!

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

Tekijä

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.

Tekijä

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

Paras vastaus

Hi,

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

inherit_id="website.assets_frontend"


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 23
7944
0
toukok. 23
3235
1
tammik. 23
8031
2
tammik. 23
5324
0
helmik. 21
3491