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

How to get the id of the current user logged-in to the erp, in the javascript of webmodule . My scenario is like this i want to filter the contents of a listing based on the user logged in .

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

I noticed that your accepted answer ratio is 0 / 3 ...

Tác giả

Sorry, Unfortunately no useful answers yet :(

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

Hi,

If you are in back-end get user-id by ['user_id', '=', self.session.uid], or check the context ie, " session.context ".

before that you have to define:-

var session = require('web.session');

Ả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 24
6877
1
thg 3 22
4167
Odoo Server error Đã xử lý
2
thg 3 21
4445
2
thg 12 16
7348
2
thg 7 15
4383