Skip to Content
Menu
This question has been flagged
1 Reply
7940 Views

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.

Avatar
Discard
Best Answer

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

Avatar
Discard

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

Related Posts Replies Views Activity
2
Aug 15
4479
0
Aug 15
2406
1
Mar 15
3302
1
Mar 15
97
2
Mar 15
133