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

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.

形象
丢弃
最佳答案

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 :)

形象
丢弃

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..

相关帖文 回复 查看 活动
2
8月 15
5283
0
8月 15
3100
1
3月 15
4073
2
3月 15
451
1
3月 15
436