Skip to Content
मेन्यू
This question has been flagged
1 Reply
2212 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
2
अप्रैल 24
2297
4
मई 25
2496
2
मई 25
5857
1
मार्च 25
1684
4
मार्च 25
4463