Skip to content

[FIX] purchase_ux: skip standard_price fallback when seller exists#336

Open
jcadhoc wants to merge 1 commit into
ingadhoc:18.0from
adhoc-dev:18.0-fix-purchase-ux-standard-price-fallback
Open

[FIX] purchase_ux: skip standard_price fallback when seller exists#336
jcadhoc wants to merge 1 commit into
ingadhoc:18.0from
adhoc-dev:18.0-fix-purchase-ux-standard-price-fallback

Conversation

@jcadhoc

@jcadhoc jcadhoc commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Problem

_compute_price_unit_and_date_planned_and_name in purchase_ux applied standard_price as a fallback for any line where price_unit == 0, even when a seller was configured for that product/partner. With product_replenishment_cost installed, standard_price is overwritten by the replenishment-cost cron (typically in ARS), so the fallback produces incorrect prices instead of letting product_replenishment_cost resolve the correct net_price.

Fix

Before applying the standard_price fallback, check whether a seller exists via _select_seller(). If a seller is found, skip the fallback and let product_replenishment_cost set the price via net_price.

Notes

_compute_price_unit_and_date_planned_and_name was applying standard_price
as a fallback for any line with price_unit=0, even when a seller was
configured. With product_replenishment_cost installed, standard_price
is overwritten by the replenishment-cost cron (often in ARS), causing
wrong prices when the seller later sets the correct net_price.

Backport/adaptation of ingadhoc#325 to 18.0. The 19.0 fix
uses `selected_seller_id` (field not present in 18.0); here we replace
it with an explicit _select_seller() call — if a seller is found, we
skip the standard_price fallback and let product_replenishment_cost
resolve the price via net_price.
@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants