Features
- Support convert docx to PDF.
- Support python prepare function.
- Direct print PDF in form view (support Chrome).
- Support merge file or zip file in list view.
- Support insert images as usually odoo fields. example use: odoo(doc.partner_id.image_1920).
- QR code support.
- Barcode supports. Accepted types: 'Code128', 'EAN13', 'EAN8'.
- 2 template with examples as a gift inside the module
- Free support 24/7
- Required to install libreoffice in server os
Demo
user: admin
password: admin
Template

Config

Result


Direct Print

Merge File

Zip File

Button Print


Installation
To install this module, you need to:
- install the docxtpl : Terminal order ("pip install docxtpl")
- install the docxcompse : Terminal order ("pip install docxcompose")
- install the libreoffice > 7.4 (https://wiki.ubuntu.com/LibreOffice)
Usage
To use this module, you need to:
- Go to System/Technical/Reports/Docx Template
- Create a new report
- Upload the template file.
Maintainer
This module is maintained by the Lazydoo
Overview
- o: record
- user: current user
- o_date: function format field date
- o_datetime: function format field datetime
- o_monetary: function format field monetary
- o_selection: function format field selection
- o_html: function format field html
- o_float: funtion format field float
- o_image: funtion print image (support field binary(image))
- o_count: funtion count field o2m, m2m
- o_qrcode: function print qrcode (support field char)
- o_barcode: self._format_barcode (support field char)
Field Char
- Example:
- {{o.name}}
- {{o_qrcode(o.website, width=20, height=20)}}
- {{o_barcode(o.vat, width=200, height=40, humanreadable=True, quiet=True)}}
- Ref function barcode in model ir.actions.report
Field Date
- Example:
- {{o_date(o.order_date, date_format='full', lang_code='en')}}
- Parameters:
- date_format: one of “full”, “long”, “medium”, or “short”, or a custom date/time pattern
- lang_code: a Locale object or a locale identifier
Field Datetime
- Example:
- {{o_datetime(o.create_date, date_format='long', tz='UTC', lang_code='en')}}
- Parameters:
- dt_format: one of “full”, “long”, “medium”, or “short”, or a custom date/time pattern
- tz: the timezone to apply to the time for display
- lang_code: a Locale object or a locale identifier
Field Monetary
- Example:
- {{o_monetary(o.amount_total, currency_obj=o.currency_id, digits=2, no_break_space=True)}}
- Parameters:
- currency_obj: object currency
- digits: default currency_obj.decimal_places (optional)
- no_break_space: default True (optional)
Field Selection
- Example:
- {{o_selection(o.state, field_name='state')}}
- Parameters:
- field_name: technology field name
Field Html
- Example:
- {{o_html(o.note)}}
Field Float
- Example:
- {{o_float(o.price_unit)}}
- Parameters:
- precision_digits: number of fractional digits to round to
- precision_rounding: decimal number representing the minimum non-zero value at the desired precision (for example, 0.01 for a 2-digit precision)
- rounding_method: the rounding method used 'HALF-UP', 'UP' or 'DOWN' the first one rounding up to the closest number with the rule that number>=0.5 is rounded up to 1, the second always rounding up and the latest one always rounding down
Field Binary
- Example:
- {{o_image(o.partner.image_1920, width=20, height=20)}}
- Parameters:
- width: default=15 (optional)
- height: default=15 (optional)
- no_break_space: optional, default True
Field One2many, Many2many
- Example:
- {%tr for i, line in o_count(o.order_line, start=1) %}
- Parameters:
- start: default=1 (optional)
Author & Maintainer
- This module is maintained by the Lazydoo <leejay2705@gmail.com>
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
Report comment
Any abuse of this reporting system will be penalizedbad support
When I try printing more than one record, the module throws up an error and though it generates the PDF or DOC file, the content is a repetition of the first record.
Also, when I try a zip of multiple records, it generates and zips the expected number of PDF files but the content of the files are also a repetition of the first PDF file though all files have different name.
Support request to author has NOT been responded to.
Find the error screenshot or screencast below.
Re: bad support
Thank you.
Hi Robert,
First, thank you for buying the module, please check the requirements: