Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Technical help on odoo cache framework

by Holger Brunn <holger@brunn.email> - 24/04/2020 15:38:31
> Hi, if you have cache issues, sometimes it may be useful to call

> `invalidate_cahce` (

> https://github.com/odoo/odoo/blob/36c2c7f04cc4fb63df17fcadb2eee6c5ea2e0a80/

> odoo/models.py#L5190 [1] ) for the records/fields you are working on. It may

> help you fix your code or better understand why it isn't working as is.

very often the culprit is not declaring all dependencies in @api.depends. When 
you do that right, the framework takes care of updating the cache

Reference