Hello, I want to restrict access to certain records in Odoo based on the logged-in user’s group. How can I implement record rules? (using python)
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ờ
1
Trả lời
323
Lượt xem
Hello,
Here is an example :
def _filter_access(self):
if self.env.user.has_group('module.group'):
return [('user_id', '=', self.env.uid)]
return []
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ý