Community mailing list archives

community@mail.odoo.com

Re: cache gone with sudo()

by
Andre Kurniawan
- 05/18/2016 04:11:09

Hello Holger,

I want to fetch some fields from related field, for example: record.new_field = record.relation1_id.this_field, since the model for relation1_id have some other relation fields that have no security access for the current user.

On 05/18/2016 02:57 PM, Holger Brunn wrote:

> Thank you for your reply. Is there any way to keep the current cache 
> while still using `sudo()`?

no standard way I'm aware of. You could patch the internal cache
structures, but that's a quite bad idea in general. You might want to
describe the problem you want to solve, then someone might be able to
point you to a better solution.

-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@therp.nl
web: http://therp.nl
phone: +31 (0)20 3093096

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

-- 
Regards,
Andre