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

[15.0][MIG] pricelist_cache #3122

Merged
merged 12 commits into from
May 12, 2024
Merged

Conversation

valentincastravete
Copy link

I've modified the tests to fix them because the price of a product from Odoo product module has changed:
It's caused by the odoo/addons/product module data change of a product:

The one used here:
https://github.com/juanpgarza/sale-workflow/blob/15.0-mig-pricelist_cache/pricelist_cache/data/demo.xml#L121
With the ID 18;
image

V14.0:
https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xml#L285
Price: 79.0

V15.0:
https://github.com/odoo/odoo/blob/15.0/addons/product/data/product_demo.xml#L285
Price: 15.8

After updating the price, the tests passes.

santostelmo and others added 11 commits May 7, 2024 16:17
because is_pricelist_cache_available was stored, it caused concurrent
access errors.
I removed the stored=true attribute on the field, and improved
performances in getting the status of parent lists by using sql
recursive queries.
In order to avoid long running sql transactions, instead of creating 1
job per 3 pricelists, I'm now creating 1 for each huge pricelist (root
or factor), and 3 for the others (which are smaller).
@valentincastravete valentincastravete changed the title 15.0 mig pricelist cache [15.0][MIG] pricelist_cache May 7, 2024
Copy link
Member

@angelmoya angelmoya left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@rousseldenis
Copy link
Sponsor Contributor

/ocabot migration pricelist_cache

@OCA-git-bot
Copy link
Contributor

The migration issue (#1741) has not been updated to reference the current pull request because a previous pull request (#2601) is not closed.
Perhaps you should check that there is no duplicate work.
CC @juanpgarza

@rousseldenis
Copy link
Sponsor Contributor

I've modified the tests to fix them because the price of a product from Odoo product module has changed: It's caused by the odoo/addons/product module data change of a product:

The one used here: https://github.com/juanpgarza/sale-workflow/blob/15.0-mig-pricelist_cache/pricelist_cache/data/demo.xml#L121 With the ID 18; image

V14.0: https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xml#L285 Price: 79.0

V15.0: https://github.com/odoo/odoo/blob/15.0/addons/product/data/product_demo.xml#L285 Price: 15.8

After updating the price, the tests passes.

Ok, that's why it's advised to create tests data directly in the module and not rely on Odoo's ones.

Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review

@valentincastravete
Copy link
Author

Hi @rousseldenis
Do you have merge access? Could you merge if so please?
If not, do you know who could merge this PR?
Thanks!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 15.0-ocabot-merge-pr-3122-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 756eb62 into OCA:15.0 May 12, 2024
9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 603baf9. Thanks a lot for contributing to OCA. ❤️

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.

None yet