[18.0][FIX] product_multi_price: Use the more atomic function to compute prices in the pricelist#2183
Merged
OCA-git-bot merged 1 commit intoOCA:18.0from Jan 9, 2026
Conversation
…ices in the pricelist When the pricelist is used in the sale order, this does not work because in v18 the _compute_price_rule function only computes the pricelist_item_id field. https://github.com/odoo/odoo/blob/37bf1703c7478a3010b71cd60bbb43b3295a605b/addons/sale/models/sale_order_line.py#L554 The price_unit is computed based on pricelist_item_id, but using the _compute_price function: https://github.com/odoo/odoo/blob/37bf1703c7478a3010b71cd60bbb43b3295a605b/addons/sale/models/sale_order_line.py#L658C40-L658C54 This commit updates the function to work correctly in all places by inheriting the more atomic function.
eduezerouali-tecnativa
approved these changes
Jan 8, 2026
sergio-teruel
approved these changes
Jan 8, 2026
juancarlosonate-tecnativa
approved these changes
Jan 9, 2026
Member
|
/ocabot merge patch |
Contributor
|
On my way to merge this fine PR! |
Contributor
|
Congratulations, your PR was merged at 906f9df. Thanks a lot for contributing to OCA. ❤️ |
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.
When the pricelist is used in the sale order, this does not work because in v18 the
_compute_price_rulefunction only computes thepricelist_item_idfield. https://github.com/odoo/odoo/blob/37bf1703c7478a3010b71cd60bbb43b3295a605b/addons/sale/models/sale_order_line.py#L554The
price_unitis computed based onpricelist_item_id, but using the_compute_pricefunction: https://github.com/odoo/odoo/blob/37bf1703c7478a3010b71cd60bbb43b3295a605b/addons/sale/models/sale_order_line.py#L658C40-L658C54This commit updates the function to work correctly in all places by inheriting the more atomic function.
Complementary to the migration to v18 #2103
TT56365
@Tecnativa @pedrobaeza @christian-ramos-tecnativa @eduezerouali-tecnativa could you please review this?