Skip to content

[IMP] l10n_ar_website_sale_ux: refresh tax-excluded price on variant change - #465

Closed
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:18.0from
adhoc-dev:18.0-17.0-t-69616-jr-6918-fw
Closed

[IMP] l10n_ar_website_sale_ux: refresh tax-excluded price on variant change#465
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:18.0from
adhoc-dev:18.0-17.0-t-69616-jr-6918-fw

Conversation

@fw-bot-adhoc

Copy link
Copy Markdown

What

On the product page, the Precio Sin Impuestos Nacionales (RG 4/2025) value is computed server-side in _get_additionnal_combination_info and rendered once, but it was not updated when the customer selected a different variant — only the regular price refreshed, leaving a stale tax-excluded amount.

How

  • Include the website_sale WebsiteSale public widget (new static/src/js/website_sale.js) and override _onChangeCombination to rewrite the tax-excluded amount from combination.price_tax_excluded on every combination change, using _priceToStr for currency formatting — the same way the core refreshes the regular price. We patch the widget rather than VariantMixin because Widget.extend(VariantMixin, ...) copies the mixin methods into the prototype at definition time, so a later mixin patch from this asset never reaches the instance.
  • Add the o_l10n_ar_price_tax_excluded anchor class to the <small> wrapper in the product_price inherit so the JS can target the inner .oe_currency_value.
  • Register the asset in web.assets_frontend and bump version to 17.0.1.5.0.

No Python changes: the per-combination price_tax_excluded was already provided. The JS is guarded so it only acts when the value is present (AR + tax-included websites).

Test plan

On an AR website with show_line_subtotals_tax_selection = 'tax_included':

  1. Open a product with multiple variants having different prices/taxes.
  2. Switch variant → both the regular price and the Precio Sin Impuestos Nacionales should update consistently.

Task: 69616

Forward-Port-Of: #464

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@JrAdhoc @augusto-weiss cherrypicking of pull request #464 failed.

stdout:

Auto-merging l10n_ar_website_sale_ux/__manifest__.py
CONFLICT (content): Merge conflict in l10n_ar_website_sale_ux/__manifest__.py
Auto-merging l10n_ar_website_sale_ux/views/l10n_ar_website_sale_ux.xml
CONFLICT (content): Merge conflict in l10n_ar_website_sale_ux/views/l10n_ar_website_sale_ux.xml

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @roboadhoc.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

…change

The tax-excluded price (RG 4/2025) was rendered server-side but stayed
stale when the customer switched variant on the product page. Extend the
website_sale VariantMixin to update it on combination change, mirroring
how the regular price is refreshed.

X-original-commit: 4a6601a
@JrAdhoc
JrAdhoc force-pushed the 18.0-17.0-t-69616-jr-6918-fw branch from 70edecc to da53ab1 Compare July 1, 2026 14:28
@augusto-weiss

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

roboadhoc pushed a commit that referenced this pull request Jul 1, 2026
…change

The tax-excluded price (RG 4/2025) was rendered server-side but stayed
stale when the customer switched variant on the product page. Extend the
website_sale VariantMixin to update it on combination change, mirroring
how the regular price is refreshed.

closes #465

X-original-commit: 4a6601a
Signed-off-by: Augusto Weiss <awe@adhoc.com.ar>
@roboadhoc roboadhoc closed this Jul 1, 2026
@roboadhoc
roboadhoc deleted the 18.0-17.0-t-69616-jr-6918-fw branch July 1, 2026 18:13
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.

4 participants