-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0][FIX] barcodes_generator_abstract: Caching issue #103
Conversation
lasley
commented
Aug 25, 2017
- Make cache method return ids & move the recordset method out of cache to fix OperationalError: Unable to use a closed cursor. #93
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
3bf2c3f
to
a1435cb
Compare
Isn't better to call to |
@pedrobaeza - What is the |
Sorry, I mean https://github.com/odoo/odoo/blob/cf8985e37d48ead868c83a4589b2f755f57de379/odoo/models.py#L5252 |
Oh crap I'm using the wrong methods. Thanks Pedro! |
@lasley actually you are right about not storing in ORM cache a browse_record. See odoo/odoo#8795 for a similar case. |
Good call, thanks for the confirmation and Odoo core example case @pedrobaeza. I feel like this is worthy of documentation, so I created odoo/odoo#19113. I think you're still right about the use of I'll make the fix today Edit: Ughhh I needed coffee. I'm using |
Thanks for this fix, any idea when will this be merged? I also got the same cursor error and this fixed it. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lasley. Sorry but I don't understand cache system very well, so I'm not the person the most adapted to review this change. (I never used @tools.ormcache
)
thanks for investigating this bug.
I'm sure that @StefanRijnhart, or other core experts will have a more interesting point of view than mine.
regards.
@piqoni - We need two reviews to merge, one from someone with write access. If you have reviewed and confirmed this works, please add it officially in Files Changed => Review Changes => Approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Please change module version number |
It's interesting how many people I call out on version numbers, but how many times I screw up the exact same thing myself. Done! |
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93
* [FIX] barcodes_generator_abstract: Caching issue * Make cache method return ids & move the recordset method out of cache to fix OCA#93