Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Productivity
  3. Report Designer - Word & Excel Template Engine v 19.0
  4. Sales Conditions FAQ

Report Designer - Word & Excel Template Engine

by Steven Marp https://apps.odoo.com/apps/browse?repo_maintainer_id=512936
Odoo

$ 99.00

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 2143
Technical Name sm_report_designer
LicenseOPL-1
Websitehttps://apps.odoo.com/apps/browse?repo_maintainer_id=512936
Versions 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 2143
Technical Name sm_report_designer
LicenseOPL-1
Websitehttps://apps.odoo.com/apps/browse?repo_maintainer_id=512936
Versions 19.0
  • Description
  • Documentation
  • License

Report Designer — Word & Excel Template Engine

Design professional Odoo 19 reports from .docx and .xlsx templates — no developer needed

✓ DOCX & XLSX ✓ Multi-Format Output ✓ Python Expressions ✓ Image & Conditionals ✓ Cover Page & PDF Merge

Module Video Overview

Your browser does not support the video tag.

Features

1 Word & Excel templates

Upload .docx or .xlsx files as templates. Design your report layout in Microsoft Word, LibreOffice, or Google Docs — the tools you already know. Use {{field_name}} placeholders and they get replaced with real Odoo data when you print.

2 Auto-detect & field mapping

Click Parse Template and all {{placeholder}} patterns are detected automatically. Map each placeholder to an Odoo field via dropdown selectors — supports dot notation for relational fields like {{partner_id.name}}. Zero coding required.

3 Multi-format output

Generate reports as PDF, DOCX, XLSX, HTML, ODT, or RTF. PDF conversion is powered by LibreOffice headless for pixel-perfect output. Keep the original format or convert to any supported format with one click.

PDF DOCX XLSX HTML ODT RTF

4 Table row loops

Use {{#order_line}} / {{/order_line}} markers to repeat table rows for One2many fields. Works with any model — invoice lines, sale order lines, stock moves, you name it. Rows are dynamically expanded based on the number of records.

5 Python expressions

Write inline calculations directly in your template: {{=amount_total * 0.1}}, {{=round(amount_untaxed * 0.11, 2)}}. Access record fields, user, time, datetime objects. Powered by Odoo safe_eval for security.

6 Conditional blocks

Show or hide entire paragraphs/rows based on conditions: {{#if amount_tax}} / {{#else}} / {{/if}}. Supports nested conditions for complex business logic. Different content for taxed vs. tax-free orders? No problem.

7 Format pipes

Format values inline without custom code. Available pipes:

|currency |date |datetime |number |upper |lower |title

8 Image support

Insert images from binary fields with {{img:company_id.logo}} or {{img:partner_id.image_128}}. Images are auto-resized with preserved aspect ratio (max 15cm × 10cm). Supports PNG, JPEG, GIF, WEBP, and BMP formats.

9 PDF merge & cover page

Select multiple records and generate a single merged PDF. Upload an optional DOCX cover page template — it renders with the same record data and gets prepended as the first page automatically. Perfect for batch-printing invoices, quotations, or delivery slips.

10 Domain-based template selection

Set domain conditions per template. The system auto-selects the right template based on record data — different layouts for different customer types, order amounts, or any other criteria. Fully configurable from the UI.

11 PDF preview in browser

Preview reports inline in the browser before downloading. Quick verification without leaving Odoo. Accessible via button or direct URL endpoint.

Template Syntax

// Simple placeholder
{{name}} → record field value

// Relational field (dot notation)
{{partner_id.name}} → related record value

// Format pipes
{{amount_total|currency}} → Rp 15,000,000.50
{{date_order|date}} → 04/14/2026
{{name|upper}} → S00001

// Python expression
{{=amount_untaxed * 0.11}} → calculated value
{{=round(amount_total * 0.1, 2)}} → rounded

// Conditional block
{{#if amount_tax}}
  Tax: {{amount_tax}}
{{#else}}
  No tax applied.
{{/if}}

// Table loop (One2many)
{{#order_line}}
  {{product_id}} | {{product_uom_qty}} | {{price_subtotal|currency}}
{{/order_line}}

// Image from binary field
{{img:company_id.logo}} → embedded image

How It Works

1

Design Template

Create a Word or Excel file with {{placeholder}} syntax.

2

Upload & Parse

Upload to Odoo, select the model, click Parse Template.

3

Map Fields

Map each placeholder to an Odoo field via dropdown selectors.

4

Activate

Click Activate to register a print action on the model.

5

Print!

Users click the action menu to generate the report instantly.

Requirements

✓ Odoo 19 Community or Enterprise

✓ LibreOffice installed on server (for PDF/HTML/ODT/RTF conversion)

✓ PyPDF2 or pypdf (for PDF merge feature, optional)

✓ Pillow (PIL) for image size detection (optional, uses struct fallback)

Support

We provide free bug fixes and updates for all our modules. If you need help, please submit a support request through the Odoo Apps support page. Our team is always ready to assist you.

Report Designer — Word & Excel Template Engine for Odoo 19

Table of Contents

  • 1. Getting Started
    • Prerequisites
    • Installation
  • 2. Creating Your First Template
    • Step 1: Design the Template
    • Step 2: Upload & Configure
    • Step 3: Parse & Map Fields
    • Step 4: Activate
    • Step 5: Generate Report
  • 3. Template Syntax
    • Simple Placeholders
    • Dot Notation (Relational Fields)
    • Format Pipes
    • Python Expressions
    • Conditional Blocks
    • Table Row Loops
    • Image Insertion
  • 4. Advanced Features
    • PDF Merge
    • Cover Page
    • Domain-Based Templates
    • PDF Preview
  • 5. Output Formats
  • 6. Troubleshooting
    • LibreOffice not found
    • Placeholders not replaced
    • Images not showing
    • Conditional blocks not working
  • 7. Changelog
    • Version 19.0.3.0.0
    • Version 19.0.2.0.0
    • Version 19.0.1.0.0

1. Getting Started

Prerequisites

Installation

  1. Upload the sm_report_designer module folder to your server's custom addons directory.
  2. Restart the Odoo service to detect the new module.
  3. Navigate to Apps menu, click Update Apps List.
  4. Search for "Report Designer" and click Install.

Note

After installation, a new menu item appears under Settings → Technical → Reporting → Report Designer.


2. Creating Your First Template

Step 1: Design the Template

Open Microsoft Word, LibreOffice Writer, or Google Docs and create your report layout. Use {{field_name}} placeholders wherever you want Odoo data to appear.

Example Word template:

SALES ORDER: {{name}}
Customer: {{partner_id}}
Date: {{date_order}}

Total: {{amount_total}}

Save the file as .docx (or .xlsx for spreadsheet reports).

Step 2: Upload & Configure

  1. Go to Settings → Technical → Reporting → Report Designer
  2. Click Create
  3. Fill in:
    • Name: e.g., "Sales Order Quotation"
    • Model: Select the target Odoo model (e.g., sale.order)
    • Template File: Upload your .docx or .xlsx file
    • Output Format: Choose PDF, Original, HTML, ODT, or RTF

Step 3: Parse & Map Fields

  1. Go to the Field Mappings tab
  2. Click the Parse Template button
  3. All {{placeholder}} patterns are auto-detected
  4. For each placeholder, select the correct Odoo field from the dropdown
  5. Use dot notation for relational fields: partner_id.name, company_id.logo

Step 4: Activate

  1. Click the Activate button at the top of the form
  2. A new action is registered on the target model
  3. Users can now find the report in the model's Action menu

Step 5: Generate Report

  1. Open any record of the target model (e.g., a Sale Order)
  2. Click Action menu → select your report template
  3. The report is generated and downloaded automatically

3. Template Syntax

Simple Placeholders

Replace with the value of a field on the current record:

{{name}}                    → "S00042"
{{partner_id}}              → "Azure Interior"
{{amount_total}}            → "15000000.5"

Dot Notation (Relational Fields)

Access fields on related records using dots:

{{partner_id.name}}         → "Azure Interior"
{{partner_id.email}}        → "azure@example.com"
{{company_id.name}}         → "My Company"
{{partner_id.country_id.name}} → "Indonesia"

Format Pipes

Append |format to format values inline:

{{amount_total|currency}}   → "Rp 15,000,000.50" (locale-aware)
{{date_order|date}}         → "04/14/2026" (locale-aware)
{{create_date|datetime}}    → "04/14/2026 10:30:00"
{{amount_untaxed|number}}   → "12,000,000.00"
{{name|upper}}              → "S00042"
{{name|lower}}              → "s00042"
{{partner_id|title}}        → "Azure Interior"

Python Expressions

Prefix with = to evaluate Python expressions:

{{=amount_untaxed + amount_tax}}        → sum of two fields
{{=round(amount_total * 0.1, 2)}}       → 10% rounded
{{=amount_untaxed * 0.11}}              → PPN 11%
{{='PAID' if state == 'sale' else 'DRAFT'}}

Available variables in expressions:

  • All record fields (by name)
  • record — the current Odoo record object
  • user — current user (self.env.user)
  • env — the Odoo environment
  • time, datetime — Python standard library modules

Warning

Expressions are evaluated using Odoo's safe_eval for security. Dangerous operations (file I/O, imports, etc.) are blocked.

Conditional Blocks

Show or hide paragraphs/rows based on conditions:

{{#if amount_tax}}
Tax Amount: {{amount_tax|currency}}
This order includes tax.
{{#else}}
This order is tax-free.
{{/if}}

Important rules:

  • Each {{#if ...}}, {{#else}}, and {{/if}} must be on its own paragraph (DOCX) or row (XLSX).

  • Do NOT mix conditional tags with other content on the same line.

  • Nesting is supported:

    {{#if partner_id}}
    Customer: {{partner_id}}
        {{#if amount_tax}}
        Tax: {{amount_tax}}
        {{/if}}
    {{/if}}
    
  • Conditions can be simple field names (truthy check) or expressions:

    {{#if amount_tax}}           → true if amount_tax is non-zero/non-empty
    {{#if state == 'sale'}}      → expression evaluation
    

Table Row Loops

Repeat table rows for One2many/Many2many fields:

+-----------+----------------+--------+-----------+
| No        | Product        | Qty    | Subtotal  |
+-----------+----------------+--------+-----------+
| {{#order_line}}                                  |
+-----------+----------------+--------+-----------+
| {{sequence}} | {{product_id}} | {{product_uom_qty}} | {{price_subtotal}} |
+-----------+----------------+--------+-----------+
| {{/order_line}}                                  |
+-----------+----------------+--------+-----------+

The rows between {{#order_line}} and {{/order_line}} are repeated for each record in the order_line One2many field.

Setup: In Field Mappings, map order_line as a loop field pointing to the One2many relation (e.g., order_line). Map sub-fields (sequence, product_id, etc.) within the loop context.

Image Insertion

Insert binary field images with the img: prefix:

{{img:company_id.logo}}         → company logo
{{img:partner_id.image_128}}    → partner avatar
{{img:product_id.image_256}}    → product image

DOCX behavior:

  • Images are embedded as inline drawings in the document
  • Auto-resized to max 15cm × 10cm with preserved aspect ratio
  • Supports PNG, JPEG, GIF, WEBP, BMP formats

XLSX behavior:

  • Images are inserted using openpyxl's Image class
  • Anchored to the cell where the placeholder was

4. Advanced Features

PDF Merge

Combine multiple records into a single PDF:

  1. Open your template settings
  2. Check the Merge PDF checkbox
  3. Set Output Format to PDF
  4. In a list view, select multiple records
  5. Click Action → your template
  6. One merged PDF is downloaded

Cover Page

Add a professional cover page to your PDF:

  1. Set Output Format to PDF (the Cover Page tab appears)
  2. Go to the Cover Page tab
  3. Upload a .docx file as the cover template
  4. Use the same {{placeholder}} syntax — the cover is rendered with the same record data
  5. The cover page is automatically prepended to the PDF output

Domain-Based Templates

Create multiple templates for the same model with different conditions:

  • Template A: Domain [('amount_total', '>', 10000000)] → for large orders
  • Template B: Domain [('amount_total', '<=', 10000000)] → for small orders

The system auto-selects the matching template when generating a report.

PDF Preview

Preview reports in the browser before downloading:

  • Click the Preview button on the template form
  • Or access directly: /report_designer/preview/<template_id>/<record_id>
  • PDF is displayed inline in the browser (not downloaded)

5. Output Formats

Format File Extension Notes
Original .docx / .xlsx Keeps the template format as-is
PDF .pdf Requires LibreOffice. Supports merge & cover
HTML .html Requires LibreOffice for conversion
ODT .odt OpenDocument format. Requires LibreOffice
RTF .rtf Rich Text Format. Requires LibreOffice

6. Troubleshooting

LibreOffice not found

If PDF conversion fails with "LibreOffice not found":

  1. Install LibreOffice: sudo apt install libreoffice
  2. Verify: libreoffice --version
  3. Ensure the libreoffice binary is in the system PATH

Placeholders not replaced

  • Make sure you clicked Parse Template after uploading
  • Check that each placeholder is mapped to a valid field
  • For relational fields, use dot notation: partner_id.name (not just partner_id)
  • Verify the field exists on the selected model

Images not showing

  • Ensure the binary field contains actual image data (not empty)
  • Check the field path: company_id.logo (not company_id.logo_web)
  • Supported formats: PNG, JPEG, GIF, WEBP, BMP
  • Maximum size: 15cm × 10cm (auto-scaled with aspect ratio)

Conditional blocks not working

  • Each {{#if}}, {{#else}}, {{/if}} must be on its own paragraph (DOCX) or own row (XLSX)
  • Do NOT put other text on the same line as a conditional tag
  • Check for typos: {{#if field}} not {{# if field}}

7. Changelog

Version 19.0.3.0.0

  • Added Python expressions {{=expr}}
  • Added conditional blocks {{#if}}/{{#else}}/{{/if}}
  • Added format pipes {{field|format}} (currency, date, datetime, number, upper, lower, title)
  • Added image support {{img:field}} for DOCX and XLSX
  • Added cover page support (PDF only)

Version 19.0.2.0.0

  • Added PDF merge for multiple records
  • Added domain-based template selection
  • Added PDF preview in browser
  • Added direct URL endpoints for preview and download

Version 19.0.1.0.0

  • Initial release
  • Word (.docx) and Excel (.xlsx) template support
  • Auto-detect placeholders
  • Field mapping via UI
  • Table row loops for One2many fields
  • Multi-format output (PDF, HTML, ODT, RTF)
  • One-click print action
  • Batch generation with ZIP download
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with