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

I would like assistance in adapting this code to be compatible with odoo 17


@api.model
    def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
        args += [('user_id', '=', self._uid)]
        return super(ResPartner, self)._search(args, offset, limit, order, count=count, access_rights_uid=access_rights_uid)



頭像
捨棄
最佳答案
# Try this

@api.model
def _search(self, domain, offset=0, limit=None, order=None, access_rights_uid=None):
domain += [('user_id', '=', self._uid)]
return super()._search(domain, offset=offset, limit=limit, order=order, access_rights_uid=access_rights_uid)

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
4月 24
2292
4
5月 25
2487
2
5月 25
5848
1
3月 25
1675
4
3月 25
4456