Community mailing list archives
[v9] : Call do_search_read as admin user from controllerby
super(PFPDataset, self.sudo())do_search_read(model, fields, offset, limit, domain, sort)
I tried :
I want to call do_search_read as admin user.
Dears,I'm overriding search_read like the following :
super(PFPDataset, self)do_search_read(model.sudo(), fields, offset, limit, domain, sort)
But it's not working. My purpose is to bypass record rules when it's admin user.
How to perform self.sudo() from a controller ?
Thanks a lot.
Consultant & Odoo Project Manager
TEL : +212 6-87 71 41 18
Camptocamp SA, Yannick Vaucher - Camptocamp