Skip to content
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

Merged
merged 3 commits into from
Sep 4, 2017

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Aug 25, 2017

* Make cache method return ids & move the recordset method out of cache to fix OCA#93
@pedrobaeza
Copy link
Member

Isn't better to call to .invalidate() before reading data?

@lasley
Copy link
Contributor Author

lasley commented Aug 26, 2017

@pedrobaeza - What is the invalidate()? I know of _clear_cache, which is called in the create and write, which should invalidate when we need it to. Am I missing a nuance?

@pedrobaeza
Copy link
Member

@lasley
Copy link
Contributor Author

lasley commented Aug 26, 2017

Oh crap I'm using the wrong methods. Thanks Pedro!

@pedrobaeza
Copy link
Member

@lasley actually you are right about not storing in ORM cache a browse_record. See odoo/odoo#8795 for a similar case.

@lasley
Copy link
Contributor Author

lasley commented Aug 28, 2017

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 invalidate_cache though - I can't even find _clear_cache in the Odoo 10 codebase. I find it strange where the hell I would have gotten this method - this wasn't even migrated code 😑

I'll make the fix today

Edit: Ughhh I needed coffee. I'm using clear_caches - will still double check the necessity, but will also leave the above so you can laugh at me if you'd like

@piqoni
Copy link

piqoni commented Sep 1, 2017

Thanks for this fix, any idea when will this be merged? I also got the same cursor error and this fixed it. :)

Copy link
Contributor

@legalsylvain legalsylvain left a 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.

@lasley
Copy link
Contributor Author

lasley commented Sep 1, 2017

@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

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pedrobaeza
Copy link
Member

Please change module version number

@lasley
Copy link
Contributor Author

lasley commented Sep 4, 2017

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!

@pedrobaeza pedrobaeza merged commit 9705949 into OCA:10.0 Sep 4, 2017
@lasley lasley deleted the bugfix/10.0/gh-93-cache_fix branch September 4, 2017 16:34
sla-subteno-it pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Dec 1, 2017
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
sla-subteno-it pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Dec 3, 2017
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
phatnguyenuit pushed a commit to phatnguyenuit/stock-logistics-barcode that referenced this pull request Jan 12, 2018
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Garamotte pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Feb 7, 2018
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Garamotte pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Feb 7, 2018
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Garamotte pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Feb 14, 2018
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
pedrobaeza pushed a commit to Tecnativa/stock-logistics-barcode that referenced this pull request Jun 11, 2018
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
cvinh pushed a commit to cvinh/stock-logistics-barcode that referenced this pull request Aug 13, 2019
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
chafique-delli pushed a commit to akretion/stock-logistics-barcode that referenced this pull request Dec 11, 2020
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
CarlosRoca13 pushed a commit to Tecnativa/stock-logistics-barcode that referenced this pull request Feb 2, 2021
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Zar21 pushed a commit to Studio73/stock-logistics-barcode that referenced this pull request May 19, 2021
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Zar21 pushed a commit to Studio73/stock-logistics-barcode that referenced this pull request May 19, 2021
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
sla-subteno-it pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Nov 21, 2021
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
sla-subteno-it pushed a commit to subteno-it/stock-logistics-barcode that referenced this pull request Nov 21, 2021
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
legalsylvain pushed a commit to legalsylvain/stock-logistics-barcode that referenced this pull request Oct 24, 2022
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
manuelregidor pushed a commit to sygel-technology/stock-logistics-barcode that referenced this pull request Jan 11, 2023
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
jvandri pushed a commit to Niboo/stock-logistics-barcode that referenced this pull request Mar 20, 2024
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
isaako34 pushed a commit to vauxoo-dev/stock-logistics-barcode that referenced this pull request May 22, 2024
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
isaako34 pushed a commit to vauxoo-dev/stock-logistics-barcode that referenced this pull request May 28, 2024
* [FIX] barcodes_generator_abstract: Caching issue
* Make cache method return ids & move the recordset method out of cache to fix OCA#93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants