Skip to content
Snippets Groups Projects
Commit b9d7f3e4 authored by oco-odoo's avatar oco-odoo Committed by Goffin Simon
Browse files

[FIX] stock_account: anglosaxon valuation: don't generate re-reconcile...

[FIX] stock_account: anglosaxon valuation: don't generate re-reconcile original bill and iterim lines when returning a picking for a purchase with unreconciled interim entries

To reproduce the issue fixed by this commit, on a clean DB with demo data, accounting, inventory, purchase, USD as company currency and aglosaxon accounting activated:

0) Make sure you have two currrency rates set between EUR and USD (we'll call them A and B, B being the most recent one).
1) create a PO in EUR for a product in FIFO automated valuation, validate it
2) receive the product (this will create a stock valuation account.move, using rate B)
3) create the bill in EUR for a date such as it will use rate A instead of B
4) Validate the bill. This will automatically reconcile stock interim entries and create an exchange rate entry
5) Manually unreconcile the stock interim entries and exchange rate difference that were just created
6) Create a return picking for this PO

+> This had the effect of re-reconciling the bill with the stock interim entries, hence re-creating an exchange rate difference entry.

We solve that by simply filtering which kind of invoice we want to reconcile interim entries for depending on the stock move we are creating.

opw:2062040

closes odoo/odoo#39517

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent f65bdd17
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment