Customising an Existing Odoo Report

A business often wants a standard Odoo document changed. How to customise an existing report cleanly.

Odoo comes with standard reports, standard documents, and a business often wants one of them changed. This piece is about customising an existing Odoo report.

Why a business customises a standard report

Odoo provides standard reports, the standard documents it produces, a standard invoice document, a standard order document, and so on. A business often wants one of these changed: the document adjusted to suit the business, its layout altered, its content changed, the business's own touches added. The standard report is a starting point, and customising it is adjusting it to the business's genuine requirement for that document.

The principle: extend, do not rewrite

The central principle for customising an existing report is the same principle that runs through clean Odoo development: extend, do not rewrite. To change a standard report, a developer should extend the existing report's template, expressing just the genuine changes to it, rather than rewriting the report wholly as a new version. The standard report's template stays as it is; the customization extends it with the genuine changes. This is the same idea as view inheritance: a change to an existing thing expressed as a clean extension, not a wholesale replacement.

Why extending is the clean way

Customising a report by extending it is the clean way for the same reasons extending is clean throughout Odoo. A customization that expresses just the genuine changes keeps the standard report's template intact, with the business's changes a clear, separate layer on top. This is maintainable, and it carries through upgrades far better: when Odoo's standard report changes in a new version, a customization that just expressed the genuine changes adapts far more easily than a wholly rewritten report would. Rewriting a standard report wholly, by contrast, replaces Odoo's report with the developer's whole version, which is fragile and a burden at upgrade. Extending is the clean way; rewriting is not.

Customise for the genuine requirement

An honest note. Customising an existing report should be done for the business's genuine requirement: the genuine changes the business needs to the document. A developer customising a report should make the genuine changes the business needs, cleanly extending the standard report to do so, and no more. Customising a report for genuine need, cleanly, gives the business the document it wants while keeping the customization maintainable. Customising more than genuinely needed, or rewriting rather than extending, makes the customization a burden.

The takeaway

Customising an existing Odoo report changes a standard Odoo document to suit a business's genuine requirement. The central principle is to extend, not rewrite: customise by extending the existing report's template with just the genuine changes, leaving the standard template intact with the changes a clean layer on top. Extending is the clean way, maintainable and far better through upgrades, where rewriting the report wholly is fragile and a burden. Customise for the business's genuine requirement, cleanly. For how we approach Odoo, see our ERP practice.

All posts

Got a Topic Worth Posting?

Suggest a Topic

If a question keeps coming up in your operations, it might be worth its own post.