- Install product_margin
- Go to Invoicing > Customers > Invoices and create an Invoice
- Add a Credit Note
- Go to Accounting > Reporting > Product Margins and check Product used in the Invoice
The "Avg. Sale Unit Price" is incorrect. It should be 0 as it is for "# Invoiced in Sale"
Credit Notes are not taken into consideration when computing "Avg. Sale Unit Price".
This is also the case for discount.
opw-2382797
closesodoo/odoo#65777
X-original-commit: 8c7feb45f1ee8581e259f3c2aaff7a139f516d94
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>