[19.0][MIG] product_variant_sale_price: Migration to 19.0#423
[19.0][MIG] product_variant_sale_price: Migration to 19.0#423NICO-SOLUTIONS wants to merge 48 commits into
Conversation
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 |
I am not familiar with this module because I have not used it, although I have never liked the fact that this module sets price_extra to 0 (just an opinion without any context of actual use). |
@victoralmau Managing pricing via attribute-based surcharges tends to become complex quickly and is often harder to maintain, particularly for non-technical users. In contrast, fixed prices per variant are usually easier to manage and more intuitive from a customer perspective. That said, I agree that this approach can introduce inconsistencies in eCommerce scenarios. In such cases, a more explicit way to disable or ignore extra prices (e.g., via an additional module) would be an approach. |
b480034 to
b8c6c9e
Compare
|
This PR has the |
b8c6c9e to
e73e1ca
Compare
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/
Apply suggested changes from FrankC013
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/
e73e1ca to
e1c8f83
Compare





standard migration