Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
308 มุมมอง

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)

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,


Here is an example :

def _filter_access(self):

    if self.env.user.has_group('module.group'):

        return [('user_id', '=', self.env.uid)]

    return []




อวตาร
ละทิ้ง