Availability |
Odoo Online
Odoo.sh
On Premise
|
Community Apps Dependencies | Show |
Lines of code | 1061 |
Technical Name |
oi_excel_export |
License | OPL-1 |
Website | https://www.open-inside.com |
Versions | 11.0 12.0 13.0 14.0 15.0 16.0 17.0 |
Dynamic Excel Generation
"Easily Create Excel Report from Python Code"
This module allows users to generate excel reports from a few lines of code.
Description
This module is the core and base engine for generating reports in Excel formats. “Dynamic Excel Generation” module allows users to easily create excel reports from a few lines of Python code.
Dependencies
Web
Base
Oi_action_file
Base_import
Demonstration
Sample Code
rows = [ ['Order Number', 'Customer','Salesperson', 'Amount'] ] for record in records.sorted(lambda record: record.partner_id.name): row = [record.name, record.partner_id.name, record.user_id.name, record.amount_total] rows.append(row) action = env['oi_excel_export'].export(rows)
An illustration of the generated report

Group Example
rows = [ ['Order Number', 'Customer','Salesperson', 'Amount'] ] group_rows = [] last_partner = None for record in records.sorted(lambda record: record.partner_id.name): if last_partner is None or last_partner != record.partner_id.name: group_rows.append(len(rows)) rows.append([record.partner_id.name]) last_partner = record.partner_id.name row = [record.name, record.partner_id.name, record.user_id.name, record.amount_total] rows.append(row) action = env['oi_excel_export'].export(rows, group_rows = group_rows)
An illustration of the generated report

Available method parameters
decimal_places=2, row_color1='white', row_color2='#f8f9f9', summary_color='#ebedef', header_color='#ebedef', group_color ='#B0D1F7', title_color = '#B0C4DE', date_format='yyyy-MM-dd', filename='report', add_row_total = 'SUM', add_column_total = None, header_rows_count = 1, header_columns_count = 0, date_cols = [], summary_rows = [], group_rows = [], total_rows=[], total_columns=[], percentage_columns=[], percentage_rows=[], row_merge_cells=[], worksheet_name ='data', pdf = False, empty_rows = [], title_rows = [], action = True, outlines_row = [], outline_on=True, outline_below=True, outline_right=True, auto_style =False, images = [], after_func = None, openpyxl_func = None, freeze_panes = True, formats = {}, char_width = 1.0, min_width = 10, max_width = 100, landscape = None, html = False, font_size = None, data_source = None
Other applications that use this tools
Need Any Help?
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