how to browse all user record , if i browse record only i can get who entered
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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"
try this crm_obj.browse(self.cr,1,lines) but this is not good practice as it breaks security
yes thanks
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký