Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4402 Lượt xem

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





Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

Hi!

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

Tác giả

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.

Tác giả

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

Câu trả lời hay nhất

Hi,

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

inherit_id="website.assets_frontend"


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 23
7909
0
thg 5 23
3175
1
thg 1 23
8001
2
thg 1 23
5304
0
thg 2 21
3436