[FIX]purchase_ux: fix the error when creating a purchase order with a… - #325
Open
jcadhoc wants to merge 1 commit into
Open
[FIX]purchase_ux: fix the error when creating a purchase order with a…#325jcadhoc wants to merge 1 commit into
jcadhoc wants to merge 1 commit into
Conversation
Contributor
… product that has no default code
jcadhoc
pushed a commit
to adhoc-dev/purchase
that referenced
this pull request
Aug 13, 2026
_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.
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.

… product that has no default code