跳至內容
選單
此問題已被標幟
1 回覆
304 瀏覽次數

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 []




頭像
捨棄