Odoo Help

1

browse all user record

By
gpkarthick
on 5/6/13, 11:14 AM 6,365 views

how to browse all user record , if i browse record only i can get who entered

1
Naresh Soni (nch)
On 5/6/13, 11:17 AM

Hi,

You need to browse using uid=1 i.e as a ADMIN USER. Other wise record rules will restrict them.

Thanks,

lines = crm_obj.search(self.cr, self.uid, [('date_open','>=',d1), ('date_open','<=',d2)])
if lines: date_br = crm_obj.browse(self.cr,self.uid,lines)---->here i can get only admin record(i need to get all user record how to get it) print date_br.name,"6666666666666666"

gpkarthick
on 5/6/13, 11:20 AM

try this crm_obj.browse(self.cr,1,lines) but this is not good practice as it breaks security

Naresh Soni (nch)
on 5/6/13, 11:26 AM

yes thanks

gpkarthick
on 5/15/13, 11:10 AM
2
Sudhir Arya (SA)
On 5/6/13, 11:23 AM

To get all IDs of users, you need to search for users with blank list which will return list of IDs of all users. Then you can browse them all.

Try this:

user_ids = self.search(cr, uid, [], context=context)
for user in self.browse(cr, uid, user_ids, context=context):
    #Your code goes here

About This Community

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

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 5/6/13, 11:14 AM
Seen: 6365 times
Last updated: 3/16/15, 8:10 AM