Repository navigation
[MIG] website_sale_hide_all_prices: Migration to 20.0 - #528
Closed
ALopez-Adhoc wants to merge 10 commits into
Closed
ALopez-Adhoc wants to merge 10 commits into
ALopez-Adhoc wants to merge 10 commits into
Conversation
Currently translated at 100.0% (14 of 14 strings) Translation: website-19.0/website-19.0-website_sale_hide_all_prices Translate-URL: https://translation.dev-adhoc.com/projects/website-19-0/website-19-0-website_sale_hide_all_prices/es/ (cherry picked from commit d5456c3)
Contributor
Cover how 'hide all prices' behaves in 19, with the setting on and off: the payment mail is not sent, no shop page shows the product price (grid, product page, comparison, cart, checkout and wishlist), the frontend session gets the flag, and checkout ends in a quotation request instead of a payment, also from the address form. (cherry picked from commit 5fa506b)
- Depend only on website_sale_ux: website_sale_comparison and website_sale_wishlist were merged into website_sale, so the compare, wishlist and comparison row views now inherit the website_sale ones. - Views: anchor on the new markup of the product page base unit price, the extra price badge, the dynamic products snippet price and the comparison table; combination_info['prevent_zero_price_sale'] is now 'hide_price', and the main button uses cart_has_blocking_alerts since sale.order._is_cart_ready is gone. - Controller: validate the cart and addresses with website.checkout.step.validate_checkout_progress (the controller _check_cart_and_addresses is gone), use env.website and _update_cart_taxes_and_prices, and answer the address form with a JSON response. - JS: patch ItemAddedNotification and extend CartNotificationLine instead of replacing the add to cart notification template, and use this. in the inherited Owl templates. - Tests: use session_store(), HttpCase.csrf_token() and the test user groups of the 20.0 test commons.
…idden prices In 20.0 the suggested products and the cart line price blocks set combination_info and product_price inside the block the module hides, and use them right after it (base unit price). With prices hidden the cart page failed with a KeyError or a TypeError. Move those t-set out of the hidden block and hide the base unit price too. Keep the native classes of the payment status block, new in 20.0. The page test now has a product with an accessory and the reference price enabled, which fails with a 500 on /shop/cart without the fix.
In 20.0 the search suggestions always show the product price (it moved to search_item_metadata, which can no longer be turned off from the editor), and the new packaging selector of the product page shows the price per packaging. Use the native hooks to drop those prices when the website hides all prices, and skip the packaging price on hover. The page test now has a product with several packagings and checks the search suggestions; both fail without this change.
ALopez-Adhoc
force-pushed
the
20.0-t-76641-loa
branch
from
November 3, 2026 12:27
3c9a914 to
ed66a4b
Compare
ALopez-Adhoc
marked this pull request as ready for review
November 3, 2026 15:26
Contributor
|
@roboadhoc rebase-ff r+ nobump |
Contributor
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Currently translated at 100.0% (14 of 14 strings) Translation: website-19.0/website-19.0-website_sale_hide_all_prices Translate-URL: https://translation.dev-adhoc.com/projects/website-19-0/website-19-0-website_sale_hide_all_prices/es/ (cherry picked from commit d5456c3) Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Cover how 'hide all prices' behaves in 19, with the setting on and off: the payment mail is not sent, no shop page shows the product price (grid, product page, comparison, cart, checkout and wishlist), the frontend session gets the flag, and checkout ends in a quotation request instead of a payment, also from the address form. (cherry picked from commit 5fa506b) Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…bols-icons Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
- Depend only on website_sale_ux: website_sale_comparison and website_sale_wishlist were merged into website_sale, so the compare, wishlist and comparison row views now inherit the website_sale ones. - Views: anchor on the new markup of the product page base unit price, the extra price badge, the dynamic products snippet price and the comparison table; combination_info['prevent_zero_price_sale'] is now 'hide_price', and the main button uses cart_has_blocking_alerts since sale.order._is_cart_ready is gone. - Controller: validate the cart and addresses with website.checkout.step.validate_checkout_progress (the controller _check_cart_and_addresses is gone), use env.website and _update_cart_taxes_and_prices, and answer the address form with a JSON response. - JS: patch ItemAddedNotification and extend CartNotificationLine instead of replacing the add to cart notification template, and use this. in the inherited Owl templates. - Tests: use session_store(), HttpCase.csrf_token() and the test user groups of the 20.0 test commons. Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…idden prices In 20.0 the suggested products and the cart line price blocks set combination_info and product_price inside the block the module hides, and use them right after it (base unit price). With prices hidden the cart page failed with a KeyError or a TypeError. Move those t-set out of the hidden block and hide the base unit price too. Keep the native classes of the payment status block, new in 20.0. The page test now has a product with an accessory and the reference price enabled, which fails with a 500 on /shop/cart without the fix. Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
In 20.0 the search suggestions always show the product price (it moved to search_item_metadata, which can no longer be turned off from the editor), and the new packaging selector of the product page shows the price per packaging. Use the native hooks to drop those prices when the website hides all prices, and skip the packaging price on hover. The page test now has a product with several packagings and checks the search suggestions; both fail without this change. Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #528 Signed-off-by: Augusto Weiss <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Tarea: https://www.adhoc.inc/odoo/project.task/76641
Migration of
website_sale_hide_all_pricesto 20.0.Includes
depends:website_sale_comparisonandwebsite_sale_wishlistare gone in 20.0 (merged intowebsite_sale), so onlywebsite_sale_uxstays.website.checkout.step.validate_checkout_progress,_update_cart_taxes_and_prices,env.website,cart_has_blocking_alerts,hide_pricein the comparison,ItemAddedNotification/CartNotificationLinefor the cart notification, Owl 3 templates./shop/cartno longer fails with accessories or reference prices while prices are hidden (20.0 sets values inside the blocks the module hides).Behaviour to note
Tests
0 failed, 0 error(s) of 5 tests.No data migration script needed: the module only stores
website.website_hide_all_prices, which does not change.