Excel Import/Export/Report

excel_import_export
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/18.0/excel_import_export
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Duy (Đỗ Anh)
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
The module provide pre-built functions and wizards for developer to
build excel import / export / report with ease.

Without having to code to create excel file, developer do,

- Create menu, action, wizard, model, view a normal Odoo development.
- Design excel template using standard Excel application, e.g., colors,
  fonts, formulas, etc.
- Instruct how the data will be located in Excel with simple dictionary
  instruction or from Odoo UI.
- Odoo will combine instruction with excel template, and result in final
  excel file.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
report_xlsx_wizard report.xlsx.wizard report.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template list New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (11)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_ids Char
    readonly=True required=True string='Resource IDs'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
  • default_get(self, fields)
    @api.model

New fields (9)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' required=True string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • filename Char
    args: 'Import File Name'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
  • check_view_init(self, context)
    This template only works on some context of active record
  • default_get(self, fields_list)
    @api.model
  • get_import_sample(self)

New fields (1)
  • report_type Selection
    ondelete={'excel': 'cascade'} selection_add=[('excel', 'Excel')]
Public methods (0)

No public methods.

New fields (2)
  • domain Char
    string='Search Criterias'
  • res_model Char
Public methods (2)
  • action_report(self)
  • safe_domain(self, str_domain)

New fields (0)

No new fields.

Public methods (7)
  • apply_extra_conditions_to_value(self, field, value, conditions_dict)
  • export_xlsx(self, template, res_model, res_ids)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model
  • run_aggre_func_dict(self, field)
  • run_field_cond_dict(self, field)
  • run_field_style_dict(self, field)
  • run_style_cond_dict(self, field)

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (24)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
  • export_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • report_action_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' string='Report Action'
  • report_menu_id Many2one → ir.ui.menu
    comodel_name='ir.ui.menu' readonly=True string='Report Menu'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • result_field Char
    compute='_compute_result_field'
  • result_model_id Many2one → ir.model
    comodel_name='ir.model' help='When use commone wizard, choose the result model' string='Report Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False help='Convert file into CSV format on export' string='Convert to CSV?'
  • use_report_wizard Boolean
    help='Use common report wizard model, instead of create specific model' string='Easy Reporting'
Public methods (10)
  • add_export_action(self)
  • add_import_action(self)
  • add_report_menu(self)
  • create(self, vals_list)
    @api.model_create_multi
  • load_xlsx_template(self, template_ids, addon=False)
    @api.model
  • remove_export_action(self)
  • remove_import_action(self)
  • remove_report_menu(self)
  • unlink(self)
  • write(self, vals)

New fields (13)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_extend Boolean
    default=False help='Extend a blank row after filling each record, to extend the footer' string='Extend'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/16.0/excel_import_export
VERSION
VERSION 1.3.2
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Rodrigo, oca-ci, Christopher Ormaza, Aungkokolin1997, PauBForgeFlow, Aung Ko Ko Lin
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:53
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
report_xlsx_wizard report.xlsx.wizard report.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template tree New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (11)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_ids Char
    readonly=True required=True string='Resource IDs'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
  • default_get(self, fields)
    @api.model

New fields (9)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' required=True string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • filename Char
    args: 'Import File Name'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
  • default_get(self, fields)
    @api.model
  • get_import_sample(self)
  • view_init(self, fields_list)
    @api.model
    This template only works on some context of active record

New fields (1)
  • report_type Selection
    ondelete={'excel': 'cascade'} selection_add=[('excel', 'Excel')]
Public methods (0)

No public methods.

New fields (2)
  • domain Char
    string='Search Criterias'
  • res_model Char
Public methods (2)
  • action_report(self)
  • safe_domain(self, str_domain)

New fields (0)

No new fields.

Public methods (7)
  • apply_extra_conditions_to_value(self, field, value, conditions_dict)
  • export_xlsx(self, template, res_model, res_ids)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model
  • run_aggre_func_dict(self, field)
  • run_field_cond_dict(self, field)
  • run_field_style_dict(self, field)
  • run_style_cond_dict(self, field)

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (24)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
  • export_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • report_action_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' string='Report Action'
  • report_menu_id Many2one → ir.ui.menu
    comodel_name='ir.ui.menu' readonly=True string='Report Menu'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • result_field Char
    compute='_compute_result_field'
  • result_model_id Many2one → ir.model
    comodel_name='ir.model' help='When use commone wizard, choose the result model' string='Report Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False help='Convert file into CSV format on export' string='Convert to CSV?'
  • use_report_wizard Boolean
    help='Use common report wizard model, instead of create specific model' string='Easy Reporting'
Public methods (10)
  • add_export_action(self)
  • add_import_action(self)
  • add_report_menu(self)
  • create(self, vals_list)
    @api.model_create_multi
  • load_xlsx_template(self, template_ids, addon=False)
    @api.model
  • remove_export_action(self)
  • remove_import_action(self)
  • remove_report_menu(self)
  • unlink(self)
  • write(self, vals)

New fields (13)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_extend Boolean
    default=False help='Extend a blank row after filling each record, to extend the footer' string='Extend'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/15.0/excel_import_export
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Saran440, Aungkokolin1997, Mantux11
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:38
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
report_xlsx_wizard report.xlsx.wizard report.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template tree New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (11)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_ids Char
    readonly=True required=True string='Resource IDs'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
  • default_get(self, fields)
    @api.model

New fields (8)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
  • default_get(self, fields)
    @api.model
  • get_import_sample(self)
  • view_init(self, fields_list)
    @api.model
    This template only works on some context of active record

New fields (1)
  • report_type Selection
    ondelete={'excel': 'cascade'} selection_add=[('excel', 'Excel')]
Public methods (0)

No public methods.

New fields (2)
  • domain Char
    string='Search Criterias'
  • res_model Char
Public methods (2)
  • action_report(self)
  • safe_domain(self, str_domain)

New fields (0)

No new fields.

Public methods (2)
  • export_xlsx(self, template, res_model, res_ids)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (24)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
  • export_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • report_action_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' string='Report Action'
  • report_menu_id Many2one → ir.ui.menu
    comodel_name='ir.ui.menu' readonly=True string='Report Menu'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • result_field Char
    compute='_compute_result_field'
  • result_model_id Many2one → ir.model
    comodel_name='ir.model' help='When use commone wizard, choose the result model' string='Report Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False help='Convert file into CSV format on export' string='Convert to CSV?'
  • use_report_wizard Boolean
    help='Use common report wizard model, instead of create specific model' string='Easy Reporting'
Public methods (10)
  • add_export_action(self)
  • add_import_action(self)
  • add_report_menu(self)
  • create(self, vals)
    @api.model
  • load_xlsx_template(self, template_ids, addon=False)
    @api.model
  • remove_export_action(self)
  • remove_import_action(self)
  • remove_report_menu(self)
  • unlink(self)
  • write(self, vals)

New fields (13)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_extend Boolean
    default=False help='Extend a blank row after filling each record, to extend the footer' string='Extend'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise'
  • row_field Char
    help='If section type is row, this field is required'
  • section_type Selection
    required=True args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10
  • sheet Char
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/14.0/excel_import_export
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSEnric Tobella, Luis González, OCA Transbot, oca-travis, Weblate, OCA-git-bot, oca-ci, Kitti U, Christopher Ormaza, oca-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
report_xlsx_wizard report.xlsx.wizard report.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template tree New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (11)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_ids Char
    readonly=True required=True string='Resource IDs'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
  • default_get(self, fields)
    @api.model

New fields (8)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' required=True string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
  • default_get(self, fields)
    @api.model
  • get_import_sample(self)
  • view_init(self, fields_list)
    @api.model
    This template only works on some context of active record

New fields (1)
  • report_type Selection
    ondelete={'excel': 'cascade'} selection_add=[('excel', 'Excel')]
Public methods (1)
  • render_excel(self, docids, data)
    @api.model

New fields (2)
  • domain Char
    string='Search Criterias'
  • res_model Char
Public methods (2)
  • action_report(self)
  • safe_domain(self, str_domain)

New fields (0)

No new fields.

Public methods (2)
  • export_xlsx(self, template, res_model, res_ids)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (24)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
    string='Description'
  • export_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.' string='Instruction'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • report_action_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' string='Report Action'
  • report_menu_id Many2one → ir.ui.menu
    comodel_name='ir.ui.menu' readonly=True string='Report Menu'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • result_field Char
    compute='_compute_result_field'
  • result_model_id Many2one → ir.model
    comodel_name='ir.model' help='When use commone wizard, choose the result model' string='Report Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False help='Convert file into CSV format on export' string='Convert to CSV?'
  • use_report_wizard Boolean
    help='Use common report wizard model, instead of create specific model' string='Easy Reporting'
Public methods (10)
  • add_export_action(self)
  • add_import_action(self)
  • add_report_menu(self)
  • create(self, vals)
    @api.model
  • load_xlsx_template(self, template_ids, addon=False)
    @api.model
  • remove_export_action(self)
  • remove_import_action(self)
  • remove_report_menu(self)
  • unlink(self)
  • write(self, vals)

New fields (13)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_extend Boolean
    default=False help='Extend a blank row after filling each record, to extend the footer' string='Extend'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise' string='No Delete'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/13.0/excel_import_export
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSStefan Rijnhart, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Kitti U, Randall Castro
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
xlrd
xlwt
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
report_xlsx_wizard report.xlsx.wizard report.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template tree New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (11)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_id Integer
    readonly=True required=True string='Resource ID'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
  • default_get(self, fields)
    @api.model

New fields (8)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' required=True string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
  • default_get(self, fields)
    @api.model
  • get_import_sample(self)
  • view_init(self, fields_list)
    @api.model
    This template only works on some context of active record

New fields (1)
  • report_type Selection
    selection_add=[('excel', 'Excel')]
Public methods (1)
  • render_excel(self, docids, data)
    @api.model

New fields (2)
  • domain Char
    string='Search Criterias'
  • res_model Char
Public methods (2)
  • action_report(self)
  • safe_domain(self, str_domain)

New fields (0)

No new fields.

Public methods (2)
  • export_xlsx(self, template, res_model, res_id)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (24)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
    string='Description'
  • export_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_action_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' ondelete='set null'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.' string='Instruction'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • report_action_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' string='Report Action'
  • report_menu_id Many2one → ir.ui.menu
    comodel_name='ir.ui.menu' readonly=True string='Report Menu'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • result_field Char
    compute='_compute_result_field'
  • result_model_id Many2one → ir.model
    comodel_name='ir.model' help='When use commone wizard, choose the result model' string='Report Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False help='Convert file into CSV format on export' string='Convert to CSV?'
  • use_report_wizard Boolean
    help='Use common report wizard model, instead of create specific model' string='Easy Reporting'
Public methods (10)
  • add_export_action(self)
  • add_import_action(self)
  • add_report_menu(self)
  • create(self, vals)
    @api.model
  • load_xlsx_template(self, template_ids, addon=False)
    @api.model
  • remove_export_action(self)
  • remove_import_action(self)
  • remove_report_menu(self)
  • unlink(self)
  • write(self, vals)

New fields (13)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_extend Boolean
    default=False help='Extend a blank row after filling each record, to extend the footer' string='Extend'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise' string='No Delete'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/12.0/excel_import_export
VERSION
VERSION 1.0.8
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSGitHub, Lois Rilo, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Tom Blauwendraat, Eric @ Elico Corp, oca-ci, Kitti U, Saran, newtratip, kittiu, Aungkokolin1997
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openpyxl
xlrd
xlwt
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
export_xlsx_wizard export.xlsx.wizard export.xlsx.wizard form New
import_xlsx_wizard import.xlsx.wizard import.xlsx.wizard form New
view_xlsx_template_form xlsx.template form New
view_xlsx_template_tree xlsx.template tree New
xlsx_report_view xlsx.report.view xlsx.report form New
Models touched (10)

New fields (6)
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • res_ids Char
    readonly=True required=True string='Resource IDs'
  • res_model Char
    readonly=True required=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • action_export(self)
    @api.multi
  • default_get(self, fields)
    @api.model

New fields (8)
  • attachment_ids Many2many → ir.attachment
    help='You can select multiple files to import.' required=True string='Import File(s) (*.xlsx)' args: 'ir.attachment'
  • datas Binary
    readonly=True related='template_id.datas' string='Sample'
  • fname Char
    readonly=True related='template_id.fname' string='Template Name'
  • import_file Binary
    string='Import File (*.xlsx)'
  • res_id Integer
    readonly=True string='Resource ID'
  • res_model Char
    readonly=True size=500 string='Resource Model'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='set null' required=True string='Template' args: 'xlsx.template'
Public methods (4)
  • action_import(self)
    @api.multi
  • default_get(self, fields)
    @api.model
  • get_import_sample(self)
    @api.multi
  • view_init(self, fields_list)
    @api.model
    This template only works on some context of active record

New fields (1)
  • report_type Selection
    selection_add=[('excel', 'Excel')]
Public methods (1)
  • render_excel(self, docids, data)
    @api.model

New fields (0)

No new fields.

Public methods (2)
  • export_xlsx(self, template, res_model, res_ids)
    @api.model
  • get_eval_context(self, model, record, value)
    @api.model

New fields (0)

No new fields.

Public methods (3)
  • get_eval_context(self, model=False, value=False)
    @api.model
  • get_external_id(self, record)
    @api.model
    Get external ID of the record, if not already exists create one
  • import_xlsx(self, import_file, template, res_model=False, res_id=False)
    @api.model
    - If res_id = False, we want to create new document first - Delete fields' data according to data_dict['__IMPORT__'] - Import data from excel according to data_dict['__IMPORT__']

New fields (5)
  • choose_template Boolean
    default=False string='Allow Choose Template'
  • data Binary
    readonly=True string='File'
  • name Char
    readonly=True size=500 string='File Name'
  • state Selection
    default='choose' help='* Choose: wizard show in user selection mode\n* Get: wizard show results from user action' args: [('choose', 'Choose'), ('get', 'Get')]
  • template_id Many2one → xlsx.template
    domain=<expr> ondelete='cascade' required=True string='Template' args: 'xlsx.template'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • report_xlsx(self)
    @api.multi

New fields (0)

No new fields.

Public methods (1)
  • get_openpyxl_styles(self)
    @api.model
    List all syles that can be used with styleing directive #{...}

New fields (17)
  • csv_delimiter Char
    default=',' help='Optional for CSV, default is comma.' required=True size=1 string='CSV Delimiter'
  • csv_extension Char
    default='csv' help='Optional for CSV, default is .csv' required=True size=5 string='CSV File Extension'
  • csv_quote Boolean
    default=True help='Optional for CSV, default is full quoting.' string='CSV Quoting'
  • datas Binary
    string='File Content'
  • description Char
    string='Description'
  • export_ids One2many → xlsx.template.export
    comodel_name='xlsx.template.export' inverse_name='template_id'
  • fname Char
    string='File Name'
  • gname Char
    help='Multiple template of same model, can belong to same group,\nresult in multiple template selection' string='Group Name'
  • import_ids One2many → xlsx.template.import
    comodel_name='xlsx.template.import' inverse_name='template_id'
  • input_instruction Text
    help='This is used to construct instruction in tab Import/Export' string='Instruction (Input)'
  • instruction Text
    compute='_compute_output_instruction' help='Instruction on how to import/export, prepared by system.' string='Instruction'
  • name Char
    required=True string='Template Name'
  • post_import_hook Char
    help='Call a function after successful import, i.e.,\n${object.post_import_do_something()}' string='Post Import Function Hook'
  • redirect_action Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' domain=[('type', '=', 'ir.actions.act_window')] help='Optional action, redirection after finish import operation' string='Return Action'
  • res_model Char
    help='The database object this attachment will be attached to.' string='Resource Model'
  • show_instruction Boolean
    default=False help='This is the computed instruction based on tab Import/Export,\nto be used by xlsx import/export engine' string='Show Output'
  • to_csv Boolean
    default=False string='Convert to CSV?'
Public methods (3)
  • create(self, vals)
    @api.model
  • load_xlsx_template(self, tempalte_ids, addon=False)
    @api.model
  • write(self, vals)
    @api.multi

New fields (12)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • is_cont Boolean
    default=False help='Continue data rows after last data row' string='Continue'
  • is_sum Boolean
    default=False string='Sum'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • style Char
    string='Default Style'
  • style_cond Char
    string='Style w/Cond.'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model

New fields (9)
  • excel_cell Char
    string='Cell'
  • field_cond Char
    string='Field Cond.'
  • field_name Char
    string='Field'
  • no_delete Boolean
    default=False help='By default, all rows will be deleted before import.\nSelect No Delete, otherwise' string='No Delete'
  • row_field Char
    help='If section type is row, this field is required' string='Row Field'
  • section_type Selection
    required=True string='Section Type' args: [('sheet', 'Sheet'), ('head', 'Head'), ('row', 'Row'), ('data', 'Data')]
  • sequence Integer
    default=10 string='Sequence'
  • sheet Char
    string='Sheet'
  • template_id Many2one → xlsx.template
    comodel_name='xlsx.template' index=True ondelete='cascade' readonly=True string='XLSX Template'
Public methods (1)
  • create(self, vals)
    @api.model
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/server-tools
PULL REQUEST
PULL REQUEST[17.0] mig-excel_import_export (#2991)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/server-tools
PULL REQUEST
PULL REQUEST[19.0][MIG] excel_import_export: Migration to 19.0 (#3537)