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

how can I search in 'res.users' to get list of ids of users in .js. I tried

var Users = new openerp.Model('res.users');



Users.query(['id']) .filter([['active', '=', true]]) .limit(15) .all().then(function (users) {

// do work with users records

alert(users);

});


It searches something , however I do not know if it is correct or wrong, I am not able to get list of ids from this code.

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

John,

You can use something like this:

new instance.web.Model(res.users').call('search', [[['active', '=', true]], 0, '', {}, ''])

.then(function(result){

// YOUR OPERATION HERE ON 'result'

});

});

hope this will help you :)

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

Pawan please, would you help me i have posted two questions please

Drees, Can u provide links to your questions...

https://www.odoo.com/fr_FR/forum/help-1/question/how-to-configure-a-page-break-through-number-of-colmns-in-rml-90464 https://www.odoo.com/fr_FR/forum/help-1/question/is-it-possible-to-generate-reports-with-dynamic-columns-in-openerp-90413

so what?? Pawan my friend where are u?

Drees, i am not much exposed to rml reporting stuff, but i am trying to expose it for your requirement .... and will surely update you if i get anything positive, and in middle if you get anything please don't forget to update.... thanks for ur patience..

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 15
5018
0
thg 8 15
2807
1
thg 3 15
3760
1
thg 3 15
97
2
thg 3 15
133