| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1132 |
| Technical Name |
leapai_magre |
| License | LGPL-3 |
| Website | https://github.com/LeapAI-SA |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1132 |
| Technical Name |
leapai_magre |
| License | LGPL-3 |
| Website | https://github.com/LeapAI-SA |
Is Easy an elegant and scalable solution to design reports using Microsoft Office.
Export data all objects odoo to Microsoft Office. output files docx, pdf
Report template *.docx
Out report DOCX or PDF
Word Merge Fields
In order for docx-mailmerge to work correctly, you need to create a standard Word document and define the appropriate merge fields. The examples below are for Word 2010. Other versions of Word should be similar. It actually took me a while to figure out this process but once you do it a couple of times, it is pretty simple.
Start Word and create the basic document structure. Then place the cursor in the location where the merged data should be inserted and choose Insert -> Quick Parts -> Field..:
From the Field dialog box, select the “MergeField” option from the Field Names list. In the Field Name, enter the name you want for the field. In this case, we are using o.name.
Once you click ok, you should see something like this: <<o.name>> in the Word document. You can go ahead and create the document with all the needed fields.
Example create report
Settings/Technical/Reporting/Reporting
Multi docs in one file docx
Multi docs in one file pdf
Config merge report pdfs
Cover template docx
Merge report pdfs
Now with preview of the document PDF
Preview report
http://localhost:8069/report/pdf/template_name/id
Note
- Embedded images inside generated DOCX files may not render in some templates.
- The merge action may not fill merge fields placed in document headers and footers.
- PDF conversion depends on LibreOffice and unoconv; Windows environments may require extra setup.
- This module is primarily tested on Odoo Community Edition.
- Conditional IF logic inside DOCX merge fields is not supported.
Help with Python expressions
Using Python expressions in templates
You can use Python expressions in merge fields to transform values at runtime. The variables below are available in the evaluation context:
env: Odoo environment for ORM access.o: active business record used by the report.record: current record in evaluation scope.user: logged-in user record.company_id: current company record.time,datetime,dateutil,timezone: helper Python libraries.
Example expression:
record.name + '_generated'
Contact us for support, consultation, customization
Contact by email
- abdzoro89@gmil.com
- a.osman@bab.com.sa
- Phone: +966562984106
- Phone: +966553368212
Pre-Installation Requirements (Convert to PDF)
- Unoconv: Convert files to any format that supports Microsoft Office. Website: Unoconv example install ubuntu O.S.
# apt-get install unoconv
Supported output format combinations (Template -> Output):
- odt -> odt
- odt -> pdf
- odt -> doc
- odt -> docx
- odt -> pds
- rtf -> rtf
- docx -> pdf
Note
Maintained for Odoo 17.0 Community (Leap AI).
Please log in to comment on this module