Skip to content

[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
Tecnativa:18.0-fix-product_multi_price-sale
Jan 9, 2026
Merged

[18.0][FIX] product_multi_price: Use the more atomic function to compute prices in the pricelist#2183
OCA-git-bot merged 1 commit intoOCA:18.0from
Tecnativa:18.0-fix-product_multi_price-sale

Conversation

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor

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.

Complementary to the migration to v18 #2103
TT56365
@Tecnativa @pedrobaeza @christian-ramos-tecnativa @eduezerouali-tecnativa could you please review this?

…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.
@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-2183-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 20abea6 into OCA:18.0 Jan 9, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 906f9df. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 18.0-fix-product_multi_price-sale branch January 9, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants