Skip to content
Snippets Groups Projects
Commit 999451e6 authored by Merel Geens (mege)'s avatar Merel Geens (mege)
Browse files

[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#125021

Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: default avatarMerel Geens <mege@odoo.com>
parent 8512402d
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment