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.

1

browse all user record

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

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

1

Naresh Soni (nch)

--Naresh Soni (nch)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1281
| 2 2 4
India
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

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)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

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

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

0 follower(s)

Stats

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