Skip to content

[17.0][FIX] sale_product_multi_add: ignore the pricelist of the wizard#4381

Open
dtec-landoo wants to merge 1 commit into
OCA:17.0from
dtec-landoo:17.0-ignore-pricelist
Open

[17.0][FIX] sale_product_multi_add: ignore the pricelist of the wizard#4381
dtec-landoo wants to merge 1 commit into
OCA:17.0from
dtec-landoo:17.0-ignore-pricelist

Conversation

@dtec-landoo
Copy link
Copy Markdown
Contributor

Context / Current behavior
Currently, when adding products to a Sale Order using the sale.import.products wizard, the price_unit of the newly created sale order lines is strictly hardcoded to the product's list_price.

This behavior bypasses Odoo's standard pricing logic. It completely ignores the pricelist applied to the Sale Order, customer-specific discounts, B2B conditions, and the order's currency, which leads to incorrect pricing on the generated lines.

Fix / Expected behavior
Removed the hardcoded assignment of "price_unit": item.product_id.list_price in the _get_line_values method.

By omitting this value during the line creation via .new(), Odoo's standard compute methods will natively take over and accurately calculate the price_unit based on the specific context of the Sale Order (Pricelist, Taxes, etc.).

@OCA-git-bot OCA-git-bot added series:17.0 mod:sale_product_multi_add Module sale_product_multi_add labels Jun 2, 2026
@dtec-landoo
Copy link
Copy Markdown
Contributor Author

@rousseldenis @newtratip @jbaudoux Hi! the patch coverage is at 100%. CI is fully green. Let me know if everything looks good to merge!

Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature Tested: Import multiple products from a Sale Order (Add Multiple Products wizard)

Steps to Reproduce / Testing Flow:

  1. Create a Product:

Product Name: Laptop
Sales Price: 150

  1. Configure a Pricelist:

Pricelist Name: Sales Pricelist
Pricelist Item: * Applied On: Product (Laptop)
Computation: Fixed Price
Fixed Price: 120

  1. Create a Sale Order:

Customer: Admin
Pricelist: Sales Pricelist
Click on the "Add Multiple Products" button from the Sale Order Lines view to open the wizard.

Observed Behavior:
Inside the "Add Multiple Products" wizard, the Unit Price for the Laptop is displayed as 150 (the standard Sales Price).

However, once the selection is confirmed and the product is added to the Sale Order Lines, the price correctly updates to 120 (based on the selected pricelist).

Suggested Improvement / Question:
Is it possible to update the "Add Multiple Products" wizard so that the Unit Price column dynamically reflects the price based on the selected Sale Order Pricelist (e.g., showing 120 instead of 150)?

Showing the pricelist-adjusted price directly in the wizard would provide a much better user experience and prevent confusion before confirmation. Could we look into making this improvement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sale_product_multi_add Module sale_product_multi_add series:17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants