Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation #165155

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

qung-odoo
Copy link
Contributor

@qung-odoo qung-odoo commented May 10, 2024

[FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation

Fixes an issue where the landed cost computation was based on the exchange rate of the accounting date instead of the invoice date, causing discrepancies in valuation and vendor bill. Now, the exchange rate of the invoice date is correctly utilized for accurate landed cost calculation.

To reproduce the issue:

  1. Create a purchase order
  2. Receive the product
  3. Create a vendor bill for landed cost product in a different currency
  4. Click on the "Create Landed Cost" button in the vendor bill

Error: The landed cost is computed using the exchange rate of the accounting date, while the total on the invoice is calculated using the invoice date's exchange rate. This results in a discrepancy between the bill price and the valuation.

The fix ensures that the exchange rate of the invoice date is used for computing the total for the landed cost.

opw-3862915


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented May 10, 2024

@C3POdoo C3POdoo requested a review from a team May 10, 2024 20:39
@qung-odoo qung-odoo changed the title [Fix] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation [FIX] stock.landed.cost: Use invoice date currency exchange rate for landed cost computation May 10, 2024
…landed cost computation

Fixes an issue where the landed cost computation was based on the exchange rate of the accounting date instead of the invoice date, causing discrepancies in valuation and vendor bill. Now, the exchange rate of the invoice date is correctly utilized for accurate landed cost calculation.

To reproduce the issue:

1. Create a purchase order
2. Receive the product
3. Create a vendor bill for landed cost product in a different currency
4. Click on the "Create Landed Cost" button in the vendor bill

Error: The landed cost is computed using the exchange rate of the accounting date, while the total on the invoice is calculated using the invoice date's exchange rate. This results in a discrepancy between the bill price and the valuation.

The fix ensures that the exchange rate of the invoice date is used for computing the total for the landed cost.

opw-3862915
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants