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

[18.0][MIG] product_pricelist_alternative: Migration to 18.0 #1863

Open
wants to merge 10 commits into
base: 18.0
Choose a base branch
from

Conversation

vvrossem
Copy link
Contributor

@vvrossem vvrossem commented Jan 28, 2025

This PR adds the context key force_price_recomputation, used in sale's sale.order::_recompute_prices(), triggered by action_update_prices() button that recomputes the unit price of all products based on the new pricelist.

This is done in order to correctly select the alternative pricelist when changing the pricelist on a SO and updating the prices.

TODO:

@vvrossem vvrossem force-pushed the 18.0-mig-product_pricelist_alternative branch from 14cc0b5 to 905bc92 Compare January 28, 2025 13:59
<field name="alternative_pricelist_policy" />
</xpath>
<xpath
expr="//page[@name='pricelist_rules']/field[@name='item_ids']/tree[@groups='product.group_sale_pricelist']/field[@name='name']"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: groups="product.group_sale_pricelist" is removed in 18.0.
Only a single <list> remain whereas before two elements existed

@vvrossem vvrossem force-pushed the 18.0-mig-product_pricelist_alternative branch 3 times, most recently from 0e719b2 to 441e62f Compare February 5, 2025 17:13
@vvrossem
Copy link
Contributor Author

vvrossem commented Feb 5, 2025

@santostelmo would you mind reviewing this PR?

Copy link
Contributor

@santostelmo santostelmo left a comment

Choose a reason for hiding this comment

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

LG

@vvrossem
Copy link
Contributor Author

vvrossem commented Feb 6, 2025

@grindtildeath would you mind reviewing this PR? 🙏

@rousseldenis
Copy link
Contributor

/ocabot migration product_pricelist_alternative

Copy link
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.

Don't agree on sale dependency addition

@santostelmo
Copy link
Contributor

Don't agree on sale dependency addition

At first glance, product dependency is enough

Copy link
Contributor

@santostelmo santostelmo left a comment

Choose a reason for hiding this comment

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

Please make it depend of product

Copy link
Contributor

@grindtildeath grindtildeath left a comment

Choose a reason for hiding this comment

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

Code looks good, drop the dependency and keep your extra code, no need for a glue module

product_pricelist_alternative/models/product_pricelist.py Outdated Show resolved Hide resolved
@vvrossem vvrossem force-pushed the 18.0-mig-product_pricelist_alternative branch from 5745b37 to 6dda360 Compare February 7, 2025 06:49
@vvrossem vvrossem force-pushed the 18.0-mig-product_pricelist_alternative branch from 6dda360 to 5486e66 Compare February 7, 2025 06:50
@vvrossem
Copy link
Contributor Author

vvrossem commented Feb 7, 2025

@sebduch73
Copy link

Hello @rousseldenis
Can you validate the PR please if it's all good ?
thx

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.

7 participants