Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Technical help on odoo cache framework
by
DEC, Yann Papouin
Indeed, self.invalidate_cache() is fixing the issue when added after super().
I tried self.invalidate_cache(['move_raw_ids']) to avoid the "RPG vs Bug" solution but the issue stay the same.
About @api.depends, I read that it was used to trigger computed fields update.
After some testing, I'm pretty sure that it is a framework issue because to reproduce it, you need this particular case:
- ProductA MTO -
Manufacture
(BoM A)
- ProductB
MTO - Manufacture (BoM B)
- ProductC MTO - Buy
- ProductD MTO - Buy
BoM A Content:
- ProductB
- ProductC
BoM B Content:
- ProductD
When creating a new ProductA production, my inherited _generate_move() is correctly called for
ProductB
production but it fails for ProductA. If BoM content is switched, then it works fine...
The second clue that make me think that it is framework issue is the fact that the CacheMiss exception should not be raised in the UI and that the server does not report any issue on INFO/DEBUG handlers like if the exception had leaked to the UI unintentionally.
Reference
-
Technical help on odoo cache framework
byDEC, Yann Papouin-
Re: Technical help on odoo cache framework
by Holger Brunn <holger@brunn.email> - 24/04/2020 15:38:31 - 1 -
Re: Technical help on odoo cache framework
byAGILE BUSINESS GROUP SAGL, Simone Rubino