-
-
Notifications
You must be signed in to change notification settings - Fork 290
[19.0][MIG] product_variant_sale_price: Migration to 19.0 #423
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
base: 19.0
Are you sure you want to change the base?
[19.0][MIG] product_variant_sale_price: Migration to 19.0 #423
Conversation
…ate is created [product_variant_sale_price] Set minimun fix_price among variants to ensure consistency with the price shown in the shop
…ariants Steps to reproduce: - create more than one variant - change fix_price of one variant Current behavior: - lst_price of all variants are changed Expected behavior: - lst_price of only selected variant is changed
Currently translated at 100,0% (4 of 4 strings) Translation: product-variant-11.0/product-variant-11.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-11-0/product-variant-11-0-product_variant_sale_price/nl/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-variant-12.0/product-variant-12.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-12-0/product-variant-12-0-product_variant_sale_price/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-12.0/product-variant-12.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-12-0/product-variant-12-0-product_variant_sale_price/pt/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-14.0/product-variant-14.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-14-0/product-variant-14-0-product_variant_sale_price/pt/
Currently translated at 83.3% (5 of 6 strings) Translation: product-variant-15.0/product-variant-15.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-15-0/product-variant-15-0-product_variant_sale_price/fr/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-15.0/product-variant-15.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-15-0/product-variant-15-0-product_variant_sale_price/ca/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-16.0/product-variant-16.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-16-0/product-variant-16-0-product_variant_sale_price/es/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-16.0/product-variant-16.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-16-0/product-variant-16-0-product_variant_sale_price/it/
FIX [UPD] Update product_variant_sale_price.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/ Translated using Weblate (Italian) Currently translated at 100.0% (7 of 7 strings) Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/it/ Translated using Weblate (Spanish) Currently translated at 100.0% (7 of 7 strings) Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/es/
[BOT] post-merge updates
…iants & optimize synchronisation - _create_variant_ids(): Variants receive fix_price directly when created - write(): Efficiently updates fix_price of variants when `list_price` is changed - Removes unnecessary _update_fix_price() calls for better performance
… from _get_combination_info In Odoo 18, the keyword argument pricelist was removed from the _get_combination_info method. This PR removes the parameter from the calls to avoid a TypeError
…riant_ids - The singleton error in _create_variant_ids will be avoided by iterating over self
…or product variants
…t file - Moved product.template methods to dedicated product_template.py - Renamed test_product_product.py -> test_product.py since both models are involved in the tests [UPD] Update product_variant_sale_price.pot [BOT] post-merge updates
Related to OCA#393 (review) FWP from 16.0: OCA@2351a7b [BOT] post-merge updates Translated using Weblate (Turkish) Currently translated at 100.0% (7 of 7 strings) Translation: product-variant-18.0/product-variant-18.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-18-0/product-variant-18-0-product_variant_sale_price/tr/
4b466ce to
576096a
Compare
|
@eikido18 |
|
If i have products with extra price in my database, and i install the product variant sale price module, i get this error message (see details below).
To get it working, i need to “upgrade” the module.
Both reported issues tested on local installation and odoo.sh using Version 19. Same issue. Odoo Server Error The above server error caused the following client error: |
576096a to
b480034
Compare
@eikido18 |
@eikido18 |
|
@eikido18 The intention is to ensure the shop does not display old extra prices and that only fix_price is used for variants. @victoralmau If this approach is acceptable, would you recommend doing this cleanup in the post-install hook (once) or dynamically in _get_combination_info? The goal is to ensure the shop display is correct without breaking other module logic. |
|
Two approaches are included in the [DO NOT MERGE] commit: Temporary: Permanent: Both options are open for discussion. Feedback on which approach to take is welcome. |
|
I'm up for any solution (I will adapt) but i think the experienced needs to answer this. @NICO-SOLUTIONS Did you fix the issue where i have to "upgrade" for the module to work? Because i still have to upgrade it seems. |
|
@eikido18 |
|
After the installation, when i try to view a product with variants in the webshop, something crashes (see above and I've also pasted it again below). It doesn't crash for you? -> Odoo Server Error RPC_ERROR Occured on masked:8069 on 2025-11-17 07:18:33 GMT Traceback (most recent call last): The above server error caused the following client error: |
|
@eikido18 For Website Sale, a separate optional module should temporarily set price_extra = 0 in-memory for the attribute values of the current combination inside _get_combination_info. This avoids changing the database and only affects the shop display. Just a question: have you experienced any issues with this in V18? Did it work for you in ecommerce? I haven’t tested it in V18 eCommerce yet. We should get that straight—time is very limited at the moment. |
527586f to
b480034
Compare
|
@eikido18 If attribute values can be set to zero permanently, it’s straightforward and not a big deal. Alternatively, the badge can be hidden by modifying the badge view. So this PR covers ONLY sales, NOT website_sale, as in previous versions. |
|
@eikido18 For now, the following is a quick temporary workaround that can be applied manually or as a small standalone module: the badges are simply hidden to keep the website display clean. Please note that this PR applies only to the sales module |





standard migration