[17.0][FIX] ensure partner context in price computation#15
Merged
Qlasta merged 1 commit into17.0-versadafrom Apr 14, 2025
Merged
[17.0][FIX] ensure partner context in price computation#15Qlasta merged 1 commit into17.0-versadafrom
Qlasta merged 1 commit into17.0-versadafrom
Conversation
oerp-odoo
approved these changes
Apr 11, 2025
|
|
||
| def test_product_supplierinfo_sale_price_without_context_passed(self): | ||
| """Test case when context is not passed during price computation. | ||
| The context should be created in the method _get_product_price_context. |
There was a problem hiding this comment.
Suggested change
| The context should be created in the method _get_product_price_context. | |
| The context should be created in the method _get_product_price_context. |
partner context passed fromm view not always present.
2c444b0 to
ca4ea6c
Compare
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 form 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.