Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how to get list of users?

By
John
on 3/27/15, 9:04 AM 654 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.

1

Pawan

--Pawan--
1267
| 4 3 5
Hyderabad, India
--Pawan--


Pawan
On 9/4/15, 6:22 AM

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 Far
on 9/4/15, 6:25 AM

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

Pawan
on 9/4/15, 6:43 AM

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

Drees Far
on 9/4/15, 6:46 AM

so what?? Pawan my friend where are u?

Drees Far
on 9/4/15, 7:01 AM

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

Pawan
on 9/4/15, 8:49 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/27/15, 9:04 AM
Seen: 654 times
Last updated: 9/4/15, 6:40 AM