Elements, Fields & Expressions
Build report content from static design objects, Odoo data and calculated values.
4. Build with elements
| Element | Use it for | Key controls |
|---|---|---|
| Text | Headings, labels, legal text and instructions. | Multi-line content, font, size, weight, bold, italic, underline, uppercase, letter spacing, line height, alignment and colour. |
| Text Path | Curved or shape-following text. | Circle, ellipse, line or rectangle path; link to an existing shape or line; Alt-click the linked geometry. |
| Line | Rules, separators, signatures and graphic structure. | Exact start/end coordinates, colour, thickness, solid/dashed/dotted/dash-dot styles and round/square/butt caps. |
| Shape | Boxes, badges, backgrounds and diagram elements. | Rectangle, circle, triangle, diamond, trapezoid, pentagon, hexagon, octagon, parallelogram, polygon, star and arrow; fill, outline, corner radius and aspect lock. |
| Table | Fixed grids such as address blocks, specifications or totals. | Rows, columns, dimensions, row heights, headers, cell padding, cell alignment, fonts, colours and borders. |
| Image | Logos, signatures, product images and decorative artwork. | Uploaded file or binary field, replace action, exact size and aspect-ratio lock. |
| Clipart | Reusable SVG symbols and icons. | Collection tree, search, selection, inversion and central administration. |
| Barcode | Identifiers and machine-readable workflow data. | Code128, EAN13, EAN8, QR and DataMatrix; field or fixed-text source; human-readable text and side cropping. |
| Computed Field | Derived labels, totals, conditional content and custom logic. | Python expression, label, live preview and the same text/number formatting controls as other fields. |
| One2many Table | Sales lines, invoice lines, stock moves and other repeating records. | Field columns, computed columns, images, barcodes, descriptions, attributes, widths, padding, headers, line style and pagination. |
Text and typography
Double-click text on the canvas, or select it and press Enter, to edit it in place. Multi-line content is preserved in PDF output. Use the inspector for reproducible typography rather than relying only on visual resizing. The bundled font aliases preserve selectable, copyable bold text in generated PDFs.
Lines and shapes
Lines can be edited as endpoints, which is useful for exact rules and angled connectors. Shapes support custom geometry parameters: polygon side count, star point count and inner ratio, trapezoid top width, arrow head/tail ratios and parallelogram slant. Colour fields offer a picker, hexadecimal values, saved swatches and, where appropriate, links to record fields for data-driven colours.
Images and cliparts
Use Upload for a fixed asset and Field for a binary image from the current record or a related record. Lock proportions before resizing logos or product images. Cliparts are SVG-only, are organised in collections, and can be searched or inverted. Administrators can manage collection folders, thumbnails and uploads under Configuration.
Barcodes
Choose the symbology that matches the source data. EAN13 and EAN8 require compatible numeric lengths; Code128 is suitable for general identifiers, while QR and DataMatrix are two-dimensional. A barcode can read from a field path or fixed text. The human-readable option applies to 1D barcodes, and side cropping can reduce whitespace up to the allowed limit.
Computed fields
Computed fields evaluate a Python expression against the current record. Use them for conditional labels, fallbacks and derived values. Preview the expression with a sample record before saving.
Examples:
record.state == 'draft' and 'Quotation' or 'Sales Order'
record.amount_total or 0
record.partner_id.name or ''
Security: computed expressions are a power-user feature. Limit editing rights to trusted users and keep expressions short, deterministic and reviewable.
5. Use Odoo fields and sample records
Field browser
The Existing Fields panel starts at the report's target model. Search by label, click a field to add it, or use the arrow on a relational field to browse deeper. This produces paths such as partner_id.name or company_id.partner_id.vat.
The separate Company Fields section provides common company values such as address, logo, registry number, VAT, phone, email, website and the first two bank accounts.
Inspector for a field
The field inspector exposes the technical path, relation handling, display widget, exact geometry, layer/lock state and typography.
- Name / Technical name / Type: confirms what the element is bound to.
- Related field: chooses the display name or a specific field of a many2one relation.
- Bank selector: resolves an available bank when the sample record supplies choices.
- Display widget: lets you override automatic presentation where supported.
- Date: inherit the report date format or choose an element-specific format; optionally show time.
- Number: Auto, Number, Integer, Percent or Currency with an optional decimal override.
Sample data workflow
- Choose a representative record in Filter Records.
- Enable Show data.
- Check related fields, images, barcodes and computed expressions.
- Use next/previous navigation to test more than one record.
- Disable Show data when you want to concentrate on field labels and layout structure.
Sample data only affects the editing preview. At print time, the current business record supplies the real values.
Advanced element features confirmed in the code
- Shape geometry: rectangle, circle, triangle, diamond, trapezoid, pentagon, hexagon, octagon, parallelogram, regular polygons with 3–12 sides, stars with 3–12 points and inner ratio, plus configurable arrows.
- Text Path: circle, ellipse, line and rectangle paths; link to an existing line or shape, unlink it, or edit linked geometry from the text-path inspector.
- Barcode formats: Code 128, EAN-13, EAN-8, QR and Data Matrix. One-dimensional codes can show human-readable text and support side cropping.
- Advanced colours: HSL wheel/planes, colour wheel, RGB/HSL/CMYK/HSV/Lab/LCH values, recently used colours, library folders and palettes, saved swatches and field-linked dynamic colours.
- Computed fields: server-evaluated Python expressions with a preview action. Use trusted expressions and validate empty values and permissions.
- Company banks: fields are offered for models with a company relation; explicit Bank 1/Bank 2 account, bank name and BIC paths are supported.
Control reference
The screenshot below shows the field inspector controls only.
