[17.0][FIX] ensure partner context in price computation.#8
Closed
Qlasta wants to merge 1 commit into17.0-versadafrom
Closed
[17.0][FIX] ensure partner context in price computation.#8Qlasta wants to merge 1 commit into17.0-versadafrom
Qlasta wants to merge 1 commit into17.0-versadafrom
Conversation
af8289f to
1b12431
Compare
partner context passed fromm view not always present.
1b12431 to
ff12bb1
Compare
oerp-odoo
reviewed
Apr 10, 2025
| "license": "AGPL-3", | ||
| "maintainers": ["luisg123v"], | ||
| "depends": ["product"], | ||
| "depends": ["sale"], |
There was a problem hiding this comment.
You are adding this on wrong module. It should be added on this one: https://github.com/OCA/sale-workflow/blob/17.0/product_supplierinfo_for_customer_sale/__manifest__.py
That one must not have sale module dependency.
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.
partner context passed from view not always present.
task id - 25458
Description
In case of Pricelist type
partner,price_unitof sale order line is calculated using partner context passed in the view (https://github.com/odoo/odoo/blob/17.0/addons/sale/views/sale_order_views.xml#L520-L526).However context is lost if price computation is triggered again from backend (e.g. when updating quantities) and it sets li
st price, but notproduct.customerinfoprice.Current Behaviour
When pricelist type is "Partner Prices on the product form", unit price in sale order line sometimes is set from list price not from customer info. Example by updating product quantity a few times in sale order line.
Expected Behavior
When pricelist type is "Partner Prices on the product form", unit price in sale order line is always set from customer info.
Proposed implementation
extend
_get_product_price_contextand update context by addingpartner_idfrom sale order.