跳至内容
菜单
此问题已终结
2 回复
4349 查看

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"


形象
丢弃
相关帖文 回复 查看 活动
1
5月 23
7856
0
5月 23
3134
1
1月 23
7943
2
1月 23
5253
0
2月 21
3387