-
- Downloads
[FIX] stock_account: don't create 0 amount COGS lines
After creating a sales order for a product with cost 0, automatic inventory valuation and AVCO, and validating the delivery, no account move is created for the stock move. If an invoice is then created from the sales order, it will create 0 amount COGS lines. Automatic reconciliation of the invoice with the corresponding stock account move will fail because no such entry exists, resulting in unreconciled lines remaining in the invoices. This issue can be prevented by either creating a 0 amount journal entry for the stock move, or preventing the creation of the 0 amount COGS lines on the invoice. Not creating unnecessary COGS lines is preferable and this was also the solution used for the same problem with purchase order invoices: https://github.com/odoo/odoo/pull/106785 . So this fix does the same for sales order invoices. opw-3000320 closes odoo/odoo#125002 X-original-commit: 5de5023d Signed-off-by:Brice Bartoletti (bib) <bib@odoo.com> Signed-off-by:
Merel Geens <mege@odoo.com>
Showing
- addons/sale_mrp/tests/test_sale_mrp_flow.py 0 additions, 2 deletionsaddons/sale_mrp/tests/test_sale_mrp_flow.py
- addons/sale_stock/tests/test_anglo_saxon_valuation.py 0 additions, 4 deletionsaddons/sale_stock/tests/test_anglo_saxon_valuation.py
- addons/stock_account/models/account_move.py 5 additions, 0 deletionsaddons/stock_account/models/account_move.py
Loading
Please register or sign in to comment