Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
8998 Visninger

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
Kassér
Bedste svar

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
Kassér

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 Besvarelser Visninger Aktivitet
2
aug. 15
5351
0
aug. 15
3130
1
mar. 15
4152
2
mar. 15
488
1
mar. 15
477