Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2385 Prikazi

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)



Avatar
Opusti
Best Answer
# 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)

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
apr. 24
2439
0
avg. 25
341
4
maj 25
2822
2
maj 25
6255
1
mar. 25
1888