| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 570 |
| Technical Name |
alnas_xlsx |
| License | LGPL-3 |
| Website | https://github.com/alienyst |
| Versions | 14.0 16.0 17.0 18.0 19.0 |
XLSX Report Generator
Helps you create reports using only a .Xlsx template and Jinja syntax.
This module inspired from Report Xlsx.
Prerequisites
Before installing this module, make sure to install the following libraries:
pip install xlsxtpl
Installation
To install this module:
- Download the module and place it in Odoo Custom Addons folder.
- Restart Odoo Server
- Go to Odoo UI and Enable Debug Mode then open the Apps menu.
- Refresh the list by clicking Update Apps List. Finally, you will see Xlsx Report Generator module and click the Install button.
Usage
For usage instructions, you can refer to the following video: Link
For example template
- Sale Order: https://github.com/alienyst/alnas-xlsx/raw/16.0/alnas_xlsx/static/description/example/example.xlsx
- Sale Order with Image Replace: https://github.com/alienyst/alnas-xlsx/raw/16.0/alnas_xlsx/static/description/example/example_with_picture.xlsx
- Sale Order with Insert Image: https://github.com/alienyst/alnas-xlsx/raw/16.0/alnas_xlsx/static/description/example/example_with_picture_insert.xlsx
Field Naming Convention
To call and write the field name, use the following format: {{docs.field_name}}, starting with the word "docs".
Useful Functions (Indonesian Language as default)
{% xv docs.date_field %}: Non-string value for a cell to to specify a variable{% yn docs.boolean_field %}: return a checkbox base on boolean condition{{ spelled_out(docs.numeric_field) }}: Spell out numbers{{ formatdate(docs.date_field) }}: Format dates{{ convert_currency(docs.monetary_field, docs.currency_id) }}: Format monetary field{% insert_img docs.image_field %}: Insert image in cell *(image fit to sel){% insert_img_cell docs.image_field %}: Insert image in cell *(cell fit to image){% insert_img_cell docs.image_field, width=200, height=200 %}: Insert image in cell *(custom image size){% img docs.image_field %}: Replace dummy image with image field, *require dummy image in template
lang default is lang='id_ID' change if need, example =
{{ spelled_out(docs.numeric_field, lang='en_US') }}
Notes
We welcome any feedback and suggestions, especially for improving this module. Thank you!

Please log in to comment on this module
There are no ratings yet!
Traceback (most recent call last): File "/home/odoo/src/user/alnas_xlsx/controllers/report_controller.py", line 59, in report_download response = self.report_routes( File "/home/odoo/src/odoo/odoo/http.py", line 716, in route_wrapper result = endpoint(self, *args, **params_ok) File "/home/odoo/src/user/alnas_xlsx/controllers/report_controller.py", line 34, in report_routes xlsx_files, file_type = report.with_context(**context)._render_jinja_xlsx(reportname, docids, data=data) File "/home/odoo/src/user/alnas_xlsx/models/ir_actions_report.py", line 47, in _render_jinja_xlsx "parsehtml": self._parse_html, AttributeError: 'ir.actions.report' object has no attribute '_parse_html'Re:
Hello,
Thank you for your feedback. I apologize for the confusion. I forgot to rescan the repository. Please download it again.
If you encounter any other issues or need further assistance, please don't hesitate to let me know.
Best regards, Li
[ISSUE] Invalid Method
Hi, I checked Python Code, Method '_parse_html' does not exist.
Please check your python code.
Re: [ISSUE] Invalid Method
Hi,
Thank you for your feedback. I have reviewed the code and noticed that the _parse_html method was indeed referenced but not defined. I have since removed the code that calls _parse_html.
Please let me know if there are any other issues or if you need further assistance.
Best regards, Li