Repository navigation
[MIG] website_sale_installment_plans: Migration to 20.0 - #523
Closed
augusto-weiss wants to merge 10 commits into
Closed
augusto-weiss wants to merge 10 commits into
augusto-weiss wants to merge 10 commits into
Conversation
Contributor
Contributor
Author
|
@roboadhoc rebase-ff |
Contributor
|
@augusto-weiss you can't rebase-ff. |
- _get_combination_info: follow the new signature (pricelist, fiscal_position) and drop parent_combination. - Product page: #product_unavailable no longer exists in website_sale.product_price; append the block inside the price container instead. - t-esc -> t-out.
…e, currency and theme - Product page: the legend is rendered inside the price container and is refreshed on variant change (get_combination_info returns it rendered, patched in ProductPage._onChangeCombination). - Amounts use the monetary widget with the website currency. - One sub-template for the product page and the shop grid, with Bootstrap classes instead of inline styles. - No legend when the price is zero or hidden by prevent_sale. - Published plans are searched once per HTTP request, only for active cards of the website company (or without company), ordered by divisor. - Drop the _get_combination_info override, so cart, configurator and comparator no longer compute plans. - Drop product from depends (comes with website_sale). map_installment_values keeps its override: payment_pay_way shows that description in the checkout installment selector.
…nslations for 20.0
…llow parent company cards - The legend is built as one translatable sentence (format_amount for the amounts), so translations keep their word order, and the plural form still follows divisor, as in 19.0. - Cards of a parent company are shown in the websites of its branches. - The per-request cache is bound to the cursor, since read-only requests can be retried on a new one.
…ol in tests The legend is formatted with the website currency, which is not $ in every database (runbot shows USD).
…checkout, and route tests map_installment_values builds the description with format_amount and takes an optional currency (the card company one by default), so the Payway checkout shows the same text as the shop. The shop passes the website currency and reuses that description. Add HttpCase tests for the combination info route and for the per-request cache of the published plans.
augusto-weiss
force-pushed
the
20.0-t-76648-awe
branch
from
November 3, 2026 14:35
18f30d1 to
71f9851
Compare
Contributor
|
@roboadhoc r+ nobump rebase-ff |
Contributor
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
- _get_combination_info: follow the new signature (pricelist, fiscal_position) and drop parent_combination. - Product page: #product_unavailable no longer exists in website_sale.product_price; append the block inside the price container instead. - t-esc -> t-out. Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…e, currency and theme - Product page: the legend is rendered inside the price container and is refreshed on variant change (get_combination_info returns it rendered, patched in ProductPage._onChangeCombination). - Amounts use the monetary widget with the website currency. - One sub-template for the product page and the shop grid, with Bootstrap classes instead of inline styles. - No legend when the price is zero or hidden by prevent_sale. - Published plans are searched once per HTTP request, only for active cards of the website company (or without company), ordered by divisor. - Drop the _get_combination_info override, so cart, configurator and comparator no longer compute plans. - Drop product from depends (comes with website_sale). map_installment_values keeps its override: payment_pay_way shows that description in the checkout installment selector. Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…nslations for 20.0 Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…llow parent company cards - The legend is built as one translatable sentence (format_amount for the amounts), so translations keep their word order, and the plural form still follows divisor, as in 19.0. - Cards of a parent company are shown in the websites of its branches. - The per-request cache is bound to the cursor, since read-only requests can be retried on a new one. Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
Part-of: #523 Signed-off-by: Alexis Lopez <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 3, 2026
…ol in tests The legend is formatted with the website currency, which is not $ in every database (runbot shows USD). Part-of: #523 Signed-off-by: Alexis Lopez <[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/76648
Migration of
website_sale_installment_plansto 20.0, plus the improvements requested for the installment legend.Migration:
20.0.1.0.0,installableTrue.upgrade_codescripts of 19.x/20.0 andowl3-migrationchanged nothing. Font Awesome icons ported to Material Symbols.website_sale.product_priceno longer hasdiv#product_unavailable(the module did not install): the legend now goes insidediv[@name='product_price'], so it is hidden together with the price._get_combination_infofollows the new signature (pricelist,fiscal_position); the override was then removed (see below).prevent_zero_price_saleis gone in 20.0:hide_price/website.prevent_saleare used instead.Improvements:
/website_sale/get_combination_inforeturns it rendered, and a patch ofProductPage._onChangeCombinationreplaces it (same pattern asproduct_tagsin core).format_amount), as one translatable sentence, keeping the 19.0 text.divisor. Cart, configurator and comparator no longer compute them.map_installment_valueskeeps its override:payment_pay_wayshows that description in the checkout.depends:productremoved (comes withwebsite_sale). README completed and es translations exported.Checked on a local 20.0 database: the module installs, its 5 tests pass, and
/shop, the product page andget_combination_inforender the legend with the variant price. Checked in the browser: changing the variant refreshes the installments without reloading the page.No data migration script is needed: no stored field, selection or model changes. It was not tested on an upgraded database: runbot does not run the 19.0 → 20.0 upgrade yet.