Account Invoices - Default Code Column
In odoo, user has the possibility to rename the "description" field of an invoice line, and at the same time delete / alter the product code. But in some situation, removing the product code is a problem, because it should be present on the invoice report.
This module avoids this problem.
For that purpose, this module adds a new dedicated column "Default code" in the account invoice report. As a side effect, it improves readability of the invoices.
Without this module
With this module
figure:
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Adds a dedicated "Code" column to the printed invoice report showing the product's internal reference, and shows the line description without that code repeated inside it.
When you print or preview a customer invoice, the invoice lines table now has an extra column called "Code" placed before the description column. That column displays the internal reference (default code) of the product of each line, so the product code is always visible on the report even if the description text was edited or the code was removed from it.
At the same time, the description column no longer repeats the code in square brackets: the module computes a cleaned-up version of the line label by removing the "[code]" part from the description, and this cleaned text is what appears on the report. The original description stored on the invoice line is not changed, only the value shown on the report.
- The extra column appears only on the standard invoice report layout (
account.report_invoice_document). - The code shown comes from the product's internal reference; if a line has no product, the code cell stays empty.
- The cleaned description is recalculated automatically whenever the line description or the product's internal reference changes.
This touches invoice lines (account.move.line) and the invoice report template. No new menus, buttons, checks or scheduled actions are added.
Depends on
Models and fields (1)
- account.move.line · extends an existing modelname_without_default_code
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: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 12.0
Confirmed on 2026-11-03 in branch 12.0 of OCA/account-invoicing.
terminal Installation and usage
No verified informationInstallation 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.