Connector Importer

connector_importer
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/18.0/connector_importer
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Iván Todorovich, Simone Orsi, oca-ci, Maksym Yankin, thien
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows to import / update records from files using the connector
framework and job queue.

To run an import you need at least:

* a backend, hosts the global configuration of the import.
* a recordset, hosts the configuration of the import for specific models and source
* a source, provides the data to import
* an import type, describes which models you want to import and how to import them

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend list New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset list New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_csv_tree import.source.csv tree import.source.csv list New
view_import_source_form import.source base form import.source form New
view_import_type_form connector_importer: import.type.csv form import.type form New
view_import_type_tree import.type list New
Models touched (11)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True
  • name Char
    required=True
  • notes Text
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version'
Public methods (5)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (5)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    Queue a job for importing data stored in to self
  • set_data(self, adict)

New fields (21)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_importable_model'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' default='no_job' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' selection=<expr>
  • last_run_on Datetime
  • name Char
    compute='_compute_name'
  • notes Html
    help='Useful info for your users'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_data Binary
    attachment=True
  • report_file Binary
  • report_filename Char
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.'
  • server_action_ids Many2many → ir.actions.server
    help="Execute a server action when done. You can link a server action per model or a single one for import.recordset. In that case you'll have to use low level api to get the records that were processed. Eg: `get_report_by_model`." string='Executre server actions' args: 'ir.actions.server'
  • server_action_importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_server_action_importable_model'
  • server_action_trigger_on Selection
    default='never' selection=[('never', 'Never'), ('last_importer_done', 'End of the whole import'), ('each_importer_done', 'End of each importer session')]
  • shared_data Binary
    attachment=True
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_report_by_model(self, model_name=None)
  • get_shared(self)
  • import_recordset(self)
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary'
  • name Char
    compute='_compute_name'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (10)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • csv_rows_from_to Char
    string='CSV use only a slice of the available lines. Format: $from:$to. NOTE: recommended only for debug/test purpose.'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (0)

No public methods.

New fields (5)
  • description Text
  • key Char
    copy=False help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).'
Public methods (2)
  • available_importers(self)
  • copy_data(self, default=None)

New fields (2)
  • job_id Many2one → queue.job
    index=True readonly=True string='Job' args: 'queue.job'
  • job_state Selection
    index=True related='job_id.state'
Public methods (3)
  • has_job(self)
  • job_done(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/17.0/connector_importer
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, r.perez
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows to import / update records from files using the
connector framework (i.e. mappers) and job queues.

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_csv_tree import.source.csv tree import.source.csv tree New
view_import_source_form import.source base form import.source form New
view_import_type_form connector_importer: import.type.csv form import.type form New
view_import_type_tree import.type tree New
Models touched (11)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True
  • name Char
    required=True
  • notes Text
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version'
Public methods (5)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (5)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    Queue a job for importing data stored in to self
  • set_data(self, adict)

New fields (21)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_importable_model'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' default='no_job' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' selection=<expr>
  • last_run_on Datetime
  • name Char
    compute='_compute_name'
  • notes Html
    help='Useful info for your users'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_data Binary
    attachment=True
  • report_file Binary
  • report_filename Char
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.'
  • server_action_ids Many2many → ir.actions.server
    help="Execute a server action when done. You can link a server action per model or a single one for import.recordset. In that case you'll have to use low level api to get the records that were processed. Eg: `get_report_by_model`." string='Executre server actions' args: 'ir.actions.server'
  • server_action_importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_server_action_importable_model'
  • server_action_trigger_on Selection
    default='never' selection=[('never', 'Never'), ('last_importer_done', 'End of the whole import'), ('each_importer_done', 'End of each importer session')]
  • shared_data Binary
    attachment=True
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_report_by_model(self, model_name=None)
  • get_shared(self)
  • import_recordset(self)
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary'
  • name Char
    compute='_compute_name'
Public methods (4)
  • create(self, vals)
    @api.model
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (10)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • csv_rows_from_to Char
    string='CSV use only a slice of the available lines. Format: $from:$to. NOTE: recommended only for debug/test purpose.'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (0)

No public methods.

New fields (5)
  • description Text
  • key Char
    copy=False help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).'
Public methods (2)
  • available_importers(self)
  • copy_data(self, default=None)

New fields (2)
  • job_id Many2one → queue.job
    index=True readonly=True string='Job' args: 'queue.job'
  • job_state Selection
    index=True related='job_id.state'
Public methods (3)
  • has_job(self)
  • job_done(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/16.0/connector_importer
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSJacques-Etienne Baudoux, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Ricardoalso, thien
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_csv_tree import.source.csv tree import.source.csv tree New
view_import_source_form import.source base form import.source form New
view_import_type_form connector_importer: import.type.csv form import.type form New
view_import_type_tree import.type tree New
Models touched (11)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True
  • name Char
    required=True
  • notes Text
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version'
Public methods (5)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (5)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    Queue a job for importing data stored in to self
  • set_data(self, adict)

New fields (21)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_importable_model'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' default='no_job' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' selection=<expr>
  • last_run_on Datetime
  • name Char
    compute='_compute_name'
  • notes Html
    help='Useful info for your users'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_data Binary
    attachment=True
  • report_file Binary
  • report_filename Char
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.'
  • server_action_ids Many2many → ir.actions.server
    help="Execute a server action when done. You can link a server action per model or a single one for import.recordset. In that case you'll have to use low level api to get the records that were processed. Eg: `get_report_by_model`." string='Executre server actions' args: 'ir.actions.server'
  • server_action_importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_server_action_importable_model'
  • server_action_trigger_on Selection
    default='never' selection=[('never', 'Never'), ('last_importer_done', 'End of the whole import'), ('each_importer_done', 'End of each importer session')]
  • shared_data Binary
    attachment=True
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_report_by_model(self, model_name=None)
  • get_shared(self)
  • import_recordset(self)
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary'
  • name Char
    compute='_compute_name'
Public methods (4)
  • create(self, vals)
    @api.model
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (10)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • csv_rows_from_to Char
    string='CSV use only a slice of the available lines. Format: $from:$to. NOTE: recommended only for debug/test purpose.'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (0)

No public methods.

New fields (5)
  • description Text
  • key Char
    copy=False help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).'
Public methods (2)
  • available_importers(self)
  • copy_data(self, default=None)

New fields (2)
  • job_id Many2one → queue.job
    index=True readonly=True string='Job' args: 'queue.job'
  • job_state Selection
    index=True related='job_id.state'
Public methods (3)
  • has_job(self)
  • job_done(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/15.0/connector_importer
VERSION
VERSION 1.7.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSSébastien Alix, Weblate, OCA-git-bot, Simone Orsi, oca-ci, dhx
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_csv_tree import.source.csv tree import.source.csv tree New
view_import_source_form import.source base form import.source form New
view_import_type_form connector_importer: import.type.csv form import.type form New
view_import_type_tree import.type tree New
Models touched (11)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True
  • name Char
    required=True
  • notes Text
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version'
Public methods (5)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (5)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    Queue a job for importing data stored in to self
  • set_data(self, adict)

New fields (19)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_importable_model'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' default='no_job' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' selection=<expr>
  • last_run_on Datetime
  • name Char
    compute='_compute_name'
  • notes Html
    help='Useful info for your users'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_file Binary
  • report_filename Char
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.'
  • server_action_ids Many2many → ir.actions.server
    help="Execute a server action when done. You can link a server action per model or a single one for import.recordset. In that case you'll have to use low level api to get the records that were processed. Eg: `get_report_by_model`." string='Executre server actions' args: 'ir.actions.server'
  • server_action_importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_server_action_importable_model'
  • server_action_trigger_on Selection
    default='never' selection=[('never', 'Never'), ('last_importer_done', 'End of the whole import'), ('each_importer_done', 'End of each importer session')]
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_report_by_model(self, model_name=None)
  • get_shared(self)
  • import_recordset(self)
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary'
  • name Char
    compute='_compute_name'
Public methods (4)
  • create(self, vals)
    @api.model
    Override to update reference to source on the consumer.
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (10)
  • csv_delimiter Char
    default=';' string="CSV delimiter ('\\t' will be replaced with a tab character)"
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • csv_rows_from_to Char
    string='CSV use only a slice of the available lines. Format: $from:$to. NOTE: recommended only for debug/test purpose.'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (6)
  • description Text
  • key Char
    copy=False help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • settings Text
    help='\n # comment me\n product.template::template.importer.component.name\n product.product::product.importer.component.name\n # another one\n product.supplierinfo::supplierinfo.importer.component.name\n ' required=False string='Legacy Settings'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).'
Public methods (3)
  • available_importers(self)
  • available_models(self)
    Retrieve available import models and their importers. Parse `settings` and yield a tuple `(model, importer, is_last_importer)`.
  • copy_data(self, default=None)

New fields (2)
  • job_id Many2one → queue.job
    readonly=True string='Job' args: 'queue.job'
  • job_state Selection
    index=True related='job_id.state'
Public methods (3)
  • has_job(self)
  • job_done(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/14.0/connector_importer
VERSION
VERSION 2.8.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSoca-travis, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Kitti U, Ricardoalso
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_csv_tree import.source.csv tree import.source.csv tree New
view_import_source_form import.source base form import.source form New
view_import_type_form connector_importer: import.type.csv form import.type form New
view_import_type_tree import.type tree New
Models touched (11)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.' string='Cron cleanup keep'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True args: 'Job running'
  • name Char
    required=True
  • notes Text
    args: 'Notes'
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version' string='Version'
Public methods (5)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (5)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    Queue a job for importing data stored in to self
  • set_data(self, adict)

New fields (19)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
    args: 'Create date'
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url' args: 'Full report url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_importable_model'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' default='no_job' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' selection=<expr> string='Jobs global state'
  • last_run_on Datetime
  • name Char
    compute='_compute_name' string='Name'
  • notes Html
    help='Useful info for your users' args: 'Notes'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_file Binary
    args: 'Report file'
  • report_filename Char
    args: 'Report filename'
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.' args: 'Sequence'
  • server_action_ids Many2many → ir.actions.server
    help="Execute a server action when done. You can link a server action per model or a single one for import.recordset. In that case you'll have to use low level api to get the records that were processed. Eg: `get_report_by_model`." string='Executre server actions' args: 'ir.actions.server'
  • server_action_importable_model_ids Many2many → ir.model
    column1='recordset_id' column2='model_id' comodel_name='ir.model' compute='_compute_importable_model_ids' help='Technical field' relation='import_recordset_server_action_importable_model'
  • server_action_trigger_on Selection
    default='never' selection=[('never', 'Never'), ('last_importer_done', 'End of the whole import'), ('each_importer_done', 'End of each importer session')]
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_report_by_model(self, model_name=None)
  • get_shared(self)
  • import_recordset(self)
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary'
  • name Char
    compute='_compute_name'
Public methods (4)
  • create(self, vals)
    @api.model
    Override to update reference to source on the consumer.
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (10)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • csv_rows_from_to Char
    string='CSV use only a slice of the available lines. Format: $from:$to. NOTE: recommended only for debug/test purpose.'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (0)

No public methods.

New fields (6)
  • description Text
  • key Char
    copy=False help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • settings Text
    help='\n # comment me\n product.template::template.importer.component.name\n product.product::product.importer.component.name\n # another one\n product.supplierinfo::supplierinfo.importer.component.name\n ' required=False string='Legacy Settings'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).' string='Use job'
Public methods (3)
  • available_importers(self)
  • available_models(self)
    Retrieve available import models and their importers. Parse `settings` and yield a tuple `(model, importer, is_last_importer)`.
  • copy_data(self, default=None)

New fields (2)
  • job_id Many2one → queue.job
    readonly=True string='Job' args: 'queue.job'
  • job_state Selection
    index=True related='job_id.state'
Public methods (3)
  • has_job(self)
  • job_done(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/13.0/connector_importer
VERSION
VERSION 1.7.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSGuewen Baconnier, sebalix, Tonow-c2c, oca-travis, OCA-git-bot, Simone Orsi
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
pytz
pyyaml
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_form import.source base form import.source form New
Models touched (10)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.' string='Cron cleanup keep'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True args: 'Job running'
  • name Char
    required=True
  • notes Text
    args: 'Notes'
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version' string='Version'
Public methods (6)
  • button_complete_jobs(self)
    Set all jobs to "completed" state.
  • check_delete(self)
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (6)
  • debug_mode(self)
  • get_data(self)
  • import_record(self, importer_config)
    @job(default_channel='root.connector_importer')
    This job will import a record. # TODO rewrite :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    queue a job for importing data stored in to self
  • set_data(self, adict)
  • unlink(self)

New fields (14)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
    args: 'Create date'
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url' args: 'Full report url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' readonly=True selection=STATES string='Jobs global state'
  • name Char
    compute='_compute_name' string='Name'
  • notes Html
    help='Useful info for your users' args: 'Notes'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_file Binary
    args: 'Report file'
  • report_filename Char
    args: 'Report filename'
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.' args: 'Sequence'
Public methods (11)
  • available_importers(self)
  • debug_mode(self)
  • generate_report(self)
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
  • get_shared(self)
  • import_recordset(self)
    @job(default_channel='root.connector_importer')
    This job will import a recordset.
  • run_import(self)
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    Update import report values.
  • set_shared(self, values, reset=False)
    Update import report values.
  • unlink(self)

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary' readonly=True
  • name Char
    compute='_compute_name' readony=True
Public methods (4)
  • create(self, vals)
    @api.model
    Override to update reference to source on the consumer.
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    ondelete='cascade' required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=False string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)

New fields (9)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
  • example_file_ext_id Char
    help="You can define example file by creating attachments with an external ID matching the 'import.source.csv' record external ID:\n\t${import.source.csv.ExtID}_example_file\n\nYou can also specify your own external ID by filling this field."
  • example_file_url Char
    compute='_compute_example_file_url' string='Download example file'
Public methods (0)

No public methods.

New fields (5)
  • key Char
    help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • options Text
    help='YAML configuration'
  • settings Text
    help='\n # comment me\n product.template::template.importer.component.name\n product.product::product.importer.component.name\n # another one\n product.supplierinfo::supplierinfo.importer.component.name\n ' required=False string='Legacy Settings'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).' string='Use job'
Public methods (2)
  • available_importers(self)
  • available_models(self)
    Retrieve available import models and their importers. Parse `settings` and yield a tuple `(model, importer, is_last_importer)`.

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/12.0/connector_importer
VERSION
VERSION 1.4.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSGitHub, sebalix, OCA-git-bot, Simone Orsi, Timon Tschanz, Matthieu Méquignon
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_form import.source base form import.source form New
Models touched (10)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)
    @api.multi

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.' string='Cron cleanup keep'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True args: 'Job running'
  • name Char
    required=True
  • notes Text
    args: 'Notes'
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version' string='Version'
Public methods (6)
  • button_complete_jobs(self)
    @api.multi
    Set all jobs to "completed" state.
  • check_delete(self)
    @api.multi
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    @api.multi
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    @api.multi
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Datetime.now args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (6)
  • debug_mode(self)
    @api.multi
  • get_data(self)
    @api.multi
  • import_record(self, component_name, model_name, is_last_importer=True)
    @api.multi@job
    This job will import a record. :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    @api.multi
    queue a job for importing data stored in to self
  • set_data(self, adict)
    @api.multi
  • unlink(self)
    @api.multi

New fields (14)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
    args: 'Create date'
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url' args: 'Full report url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' readonly=True selection=STATES string='Jobs global state'
  • name Char
    compute='_compute_name' string='Name'
  • notes Html
    help='Useful info for your users' args: 'Notes'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_file Binary
    args: 'Report file'
  • report_filename Char
    args: 'Report filename'
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.' args: 'Sequence'
Public methods (11)
  • available_models(self)
  • debug_mode(self)
  • generate_report(self)
    @api.multi
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
    @api.multi
  • get_shared(self)
    @api.multi
  • import_recordset(self)
    @api.multi@job
    This job will import a recordset.
  • run_import(self)
    @api.multi
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    @api.multi
    Update import report values.
  • set_shared(self, values, reset=False)
    @api.multi
    Update import report values.
  • unlink(self)
    @api.multi

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary' readonly=True
  • name Char
    compute='_compute_name' readony=True
Public methods (4)
  • create(self, vals)
    @api.model
    Override to update reference to source on the consumer.
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    @api.multi
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    ondelete='cascade' required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=True string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)
    @api.multi

New fields (7)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_encoding Char
    string='CSV Encoding'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
Public methods (0)

No public methods.

New fields (4)
  • key Char
    help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • settings Text
    help='\n # comment me\n product.template::template.importer.component.name\n product.product::product.importer.component.name\n # another one\n product.supplierinfo::supplierinfo.importer.component.name\n ' required=True string='Settings'
  • use_job Boolean
    default=True help='For each importer used in the settings, one job will be spawned. Untick the box if an importer depends on the result of a previous one (for instance to link a record to the previously created one).' string='Use job'
Public methods (1)
  • available_models(self)
    @api.multi
    Retrieve available import models and their importers. Parse `settings` and yield a tuple `(model, importer, is_last_importer)`.

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';', quotechar='"')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.
REPOSITORY
REPOSITORYOCA/connector-interfaces
GIT
GIThttps://github.com/OCA/connector-interfaces.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/connector-interfaces/tree/11.0/connector_importer
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYConnector
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSOCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/connector-interfaces
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/connector:
    - connector
    - component
    - component_event
OCA/queue:
    - queue_job
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES chardet
requests
cachetools
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
recordset_docs Import Recordset Docs ir.ui.view qweb New
recordset_report Import Recordset Report ir.ui.view qweb New
recordset_report_full Import Recordset FUll Report ir.ui.view qweb New
source_config_summary Source config summary ir.ui.view qweb New
view_import_backend_form import.backend form New
view_import_backend_tree import.backend tree New
view_import_recordset_form import.recordset form New
view_import_recordset_search import.recordset search New
view_import_recordset_tree import.recordset tree New
view_import_source_csv_form import.source.csv form import.source.csv group Inherits view_import_source_form
view_import_source_form import.source base form import.source form New
Models touched (10)

New fields (5)
  • cron_id Many2one → ir.cron
    domain=<expr> string='Related cron' args: 'ir.cron'
  • cron_interval_number Integer
    args: 'Interval number'
  • cron_interval_type Selection
    selection='_select_interval_type' string='Interval type'
  • cron_mode Boolean
    args: 'Cron mode?'
  • cron_start_date Datetime
    args: 'Start date'
Public methods (4)
  • create(self, vals)
    @api.model
  • get_cron_vals(self)
    @api.model
  • run_cron(self)
    @api.model
  • write(self, vals)
    @api.multi

New fields (8)
  • cron_cleanup_keep Integer
    help='If this value is greater than 0 a cron will cleanup old recordsets and keep only the latest N records matching this value.' string='Cron cleanup keep'
  • cron_master_recordset_id Many2one → import.recordset
    help='If an existing recordset is selected it will be used to create a new recordset each time the cron runs. \nIn this way you can keep every import session isolated. \nIf none, all recordsets will run.' string='Master recordset' args: 'import.recordset'
  • debug_mode Boolean
    help="Enabling debug mode causes the import to run in real time, without using any job queue. Make sure you don't do this in production!" args: 'Debug mode?'
  • job_running Boolean
    compute='_compute_job_running' help='Tells you if a job is running for this backend.' readonly=True args: 'Job running'
  • name Char
    required=True
  • notes Text
    args: 'Notes'
  • recordset_ids One2many → import.recordset
    string='Record Sets' args: 'import.recordset', 'backend_id'
  • version Selection
    required=True selection='_select_version' string='Version'
Public methods (6)
  • button_complete_jobs(self)
    @api.multi
    Set all jobs to "completed" state.
  • check_delete(self)
    @api.multi
  • cron_cleanup_recordsets(self)
    @api.model
    Delete obsolete recordsets. If you are running imports via cron and you create one recorset per each run then you might end up w/ tons of old recordsets. You can use `cron_cleanup_keep` to enable auto-cleanup. Here we lookup for backends w/ this settings and keep only latest recordsets.
  • run_all(self)
    @api.multi
    Run all recordset imports.
  • run_cron(self, backend_id)
    @api.model
  • unlink(self)
    @api.multi
    Prevent delete if jobs are running.

New fields (4)
  • backend_id Many2one → import.backend
    readonly=True related='recordset_id.backend_id' string='Backend' args: 'import.backend'
  • date Datetime
    default=fields.Date.context_today args: 'Import date'
  • jsondata_file Binary
    attachment=True
  • recordset_id Many2one → import.recordset
    string='Recordset' args: 'import.recordset'
Public methods (6)
  • debug_mode(self)
    @api.multi
  • get_data(self)
    @api.multi
  • import_record(self, component_name, model_name, is_last_importer=True)
    @api.multi@job
    This job will import a record. :param component_name: name of the importer component to use :param model_name: name of the model to import :param is_last_importer: flag for last importer of the recordset
  • run_import(self)
    @api.multi
    queue a job for importing data stored in to self
  • set_data(self, adict)
    @api.multi
  • unlink(self)
    @api.multi

New fields (14)
  • backend_id Many2one → import.backend
    string='Import Backend' args: 'import.backend'
  • create_date Datetime
    args: 'Create date'
  • docs_html Html
    compute='_compute_docs_html' string='Docs'
  • full_report_url Char
    compute='_compute_full_report_url' args: 'Full report url'
  • import_type_id Many2one → import.type
    comodel_name='import.type' required=True string='Import type'
  • jobs_global_state Selection
    compute='_compute_jobs_global_state' help='Tells you if a job is running for this recordset. If any of the sub jobs is not DONE or FAILED we assume the global state is PENDING.' readonly=True selection=STATES string='Jobs global state'
  • name Char
    compute='_compute_name' string='Name'
  • notes Html
    help='Useful info for your users' args: 'Notes'
  • override_existing Boolean
    default=True help='Enable to update existing items w/ new values. If disabled, matching records will be skipped.' string='Override existing items'
  • record_ids One2many → import.record
    string='Records' args: 'import.record', 'recordset_id'
  • report_file Binary
    args: 'Report file'
  • report_filename Char
    args: 'Report filename'
  • report_html Html
    compute='_compute_report_html' args: 'Report summary'
  • sequence Integer
    default=10 help='Sequence for the handle.' args: 'Sequence'
Public methods (11)
  • available_models(self)
  • debug_mode(self)
  • generate_report(self)
    @api.multi
  • get_records(self)
    Retrieve importable records and keep ordering.
  • get_report(self)
    @api.multi
  • get_shared(self)
    @api.multi
  • import_recordset(self)
    @api.multi@job
    This job will import a recordset.
  • run_import(self)
    @api.multi
    queue a job for creating records (import.record items)
  • set_report(self, values, reset=False)
    @api.multi
    Update import report values.
  • set_shared(self, values, reset=False)
    @api.multi
    Update import report values.
  • unlink(self)
    @api.multi

New fields (3)
  • chunk_size Integer
    default=500 required=True string='Chunks Size'
  • config_summary Html
    compute='_compute_config_summary' readonly=True
  • name Char
    compute='_compute_name' readony=True
Public methods (4)
  • create(self, vals)
    @api.model
    Override to update reference to source on the consumer.
  • get_config_view_id(self)
    Retrieve configuration view.
  • get_lines(self)
    @api.multi
    Retrieve lines to import.
  • get_reporter(self)
    Retrieve a specific reporter for this source. A report can be used to produce and extensive report for the end user. See `reporter` models.

New fields (4)
  • source_config_summary Html
    compute='_compute_source_config_summary' readonly=True
  • source_id Integer
    ondelete='cascade' required=False string='Source ID'
  • source_model Selection
    selection='_selection_source_ref_id' string='Source type'
  • source_ref_id Reference
    compute='_compute_source_ref_id' selection='_selection_source_ref_id' store=True string='Source'
Public methods (2)
  • get_source(self)
    Return the source to the consumer.
  • open_source_config(self)
    @api.multi

New fields (6)
  • csv_delimiter Char
    default=';' string='CSV delimiter'
  • csv_file Binary
    args: 'CSV file'
  • csv_filename Char
    args: 'CSV filename'
  • csv_filesize Char
    compute='_compute_csv_filesize' readonly=True string='CSV filesize'
  • csv_path Char
    args: 'CSV path'
  • csv_quotechar Char
    default='"' string='CSV quotechar'
Public methods (0)

No public methods.

New fields (3)
  • key Char
    help='Unique mnemonic identifier' required=True
  • name Char
    help='A meaningful human-friendly name' required=True
  • settings Text
    help='\n # comment me\n product.template::template.importer.component.name\n product.product::product.importer.component.name\n # another one\n product.supplierinfo::supplierinfo.importer.component.name\n ' required=True string='Settings'
Public methods (1)
  • available_models(self)
    @api.multi
    Retrieve available import models and their importers. Parse `settings` and yield a tuple `(model, importer, is_last_importer)`.

New fields (0)

No new fields.

Public methods (4)
  • report_add_line(self, writer, item)
  • report_do(self, recordset, fileout, **options)
    Produce report.
  • report_get_columns(self, recordset, orig_content, extra_keys=None, delimiter=';')
    Retrieve columns by recordset. :param recordset: instance of recordset. :param orig_content: original csv content list of line. :param extra_keys: report-related extra columns.
  • report_get_writer(self, fileout, columns, delimiter=';', quotechar='"')

New fields (0)

No new fields.

Public methods (4)
  • report_do(self, recordset, fileout, **options)
    Override me to generate the report.
  • report_finalize(self, recordset, fileout, **options)
    Apply late updates to report.
  • report_get(self, recordset, **options)
    @api.model
    Create and return a report for given recordset.
  • report_get_metadata(self, recordset, **options)
    Retrieve report file's metadata.