-
- Downloads
[FIX] sale_{stock,mrp}: repost inv with cogs
To reproduce the issue: (Also need: account_accountant,purchase) 1. Setup a product P - Storable - Category: - FIFO + Auto 2. Process a PO with 1 x P at $10 3. Process a PO with 1 x P at $50 4. Create and confirm a SO with 1 x P - Because of FIFO, the value of the delivered product is $10 5. Process the delivery 6. Post the invoice 7. Add credit note - Credit Method: Full refund and new draft invoice 8. Post the second invoice Error: The cogs are based on the second received product ($50), they should rather be based on the delivered one When computing the anglo-saxon unit price of the product, we consume the outgoing SVLs, and we consider the already-invoiced quantity. Here is the issue: we pretend that this quantity is 1, because of the first invoice, but this should be balanced with the quantity of the credit note OPW-3109789 closes odoo/odoo#114346 X-original-commit: d8e286ad Signed-off-by:William Henrotin (whe) <whe@odoo.com> Signed-off-by:
Adrien Widart <awt@odoo.com>
Showing
- addons/sale_mrp/models/account_move.py 5 additions, 1 deletionaddons/sale_mrp/models/account_move.py
- addons/sale_mrp/tests/test_sale_mrp_flow.py 75 additions, 0 deletionsaddons/sale_mrp/tests/test_sale_mrp_flow.py
- addons/sale_stock/models/account_move.py 5 additions, 0 deletionsaddons/sale_stock/models/account_move.py
- addons/sale_stock/tests/test_anglo_saxon_valuation.py 61 additions, 0 deletionsaddons/sale_stock/tests/test_anglo_saxon_valuation.py
Loading
Please register or sign in to comment