Avoid invalidating cache when not needed.
This improves a lot performances.
Closes#143403
Fixes a bug which causes that: self.flush() and self.clear_caches() were called on every property write/update and delete.
Known at least in V14/15/16/17.
closesodoo/odoo#145549
X-original-commit: b444330050a4d98e7ade42a30a6a27522b5cf4c8
Related: odoo/enterprise#52395
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>