Account invoice refund link sale
This module links refunds to their original invoices when a sales order generates a refund for lines that were originally invoiced on a specific invoice.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0When a sales order creates a credit note (refund), this module automatically links it to the original customer invoice if there is exactly one possible match, and posts a note on both documents.
This module works behind the scenes when you refund a sales order that was already invoiced. It extends the sales order process so that, after the refund (credit note) is created, Odoo looks for the original customer invoice related to the refunded lines.
- If exactly one original invoice is found, the refund is automatically linked to it as its 'reversed entry'. This means the refund now shows which invoice it corrects.
- A message is posted on the original invoice saying it has been reversed, with a link to the refund.
- A message is also posted on the refund showing the link back to the original invoice.
- If there is more than one possible original invoice, nothing is linked automatically, so you can decide manually.
The module appears in the Accounting and Sales areas, but it does not add any new menus or buttons. It only changes the behaviour when refunds are generated from sales orders. It relies on the sale.order model and the invoice creation process. The link is stored on the refund using the standard 'reversed entry' field, and the messages are added to the chatter of both documents.
Depends on
Models and fields (1)
- sale.order · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/account-invoicing.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To use this module, you need to:
- Create a product with the
Invoicing Policyset toDelivered quantities. - Go to
Sales > Orders > Quotations. - Create a sales order with the product and set the quantity to 2.
- Confirm the sales order.
- Edit the sales order line, set the
Delivered Quantityto 2, and save the sales order. - Click the
Create Invoicebutton to generate the invoice. - Go back to the sales order, edit the
Delivered Quantityto 0, and save the sales order. - Click the
Create Invoicebutton again.
In this case, a credit note will be created, and it will be linked to the original invoice.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.