odoo/odoo#193378
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-17.0-opw-4347134-vendor_price_po-gute-oq7_-fw
- head
- 4d52ed06dbf100ce91a553b308723c71caf3efe5
- merged
- 9 months ago by Logistics, William Henrotin (whe)
odoo/odoo | |
---|---|
17.0 | #189272 |
saas-17.2 | #192871 |
saas-17.4 | #192889 |
18.0 | #192918 |
saas-18.1 | #193361 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #193378 |
[FW][FIX] purchase: set_vendor_price_po_company
The issue:
When a vendor has multiple prices for two companies (A and B), and the purchase order's company is set to B (while the user's main company is A), the price incorrectly defaults to the main company A's price.
How to reproduce the issue:
1) Create a new product with 2 vendor pricelist records that have different "Unit Prices" under the "Purchase" tab of the product -> each pricelist record should belong to a different company
2) Create an RFQ for this product with both of these companies active
3) Change the "Company" on the PO under the "Other Information" tab to the company that is NOT shown in the top right-hand corner, but is still selected
4) Add the product to the RFQ order line
- The "Unit Price" will be pulled from the main company shown in the top-right hand corner, thereby ignoring the "Company" selected for the PO.
After this commit, the price from the purchase order's company (B) is prioritized over the main company (A).
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr