Base import

base_import
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/base_import
VERSION
VERSION 2.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Denis Ledoux, Xavier Morel, Aaron Bohy, GitHub, Lucas Perais (lpe), Damien Bouvy, Jorge Pinna Puissant, Julien Castiaux, Romeo Fragomeli, Julien Mougenot, Anh Thao Pham (pta), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Duckerts-Antoine, Pierre Paridans, Hubert Van De Walle, luvi, Renaud Thiry, Levi Siuzdak (sile), Dylan Kiss (dyki), Walid (wasa), sesn-odoo, Ethan Vincent, lase@odoo.com, jorv-odoo, Julien Carion (juca), kcv-odoo, Michaël Mattiello, pish-odoo, Krzysztof Magusiak (krma), bhna-odoo, Saurabh, Elliot ELCO, YoussefM890, saurabh
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • execute_import(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys: ``type`` the type of error (``error|warning``) ``message`` the error message associated with the error (a string) ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields_tree(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of :class:`Field`: .. class:: Field .. attribute:: id: str A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name: str The field's logical (Odoo) name within the scope of its parent. .. attribute:: string: str The field's human-readable name (``@string``) .. attribute:: required: bool Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields: list[Field] The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. .. attribute:: model_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's model. .. attribute:: comodel_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's comodel, i.e. if the field is a relation field. Structure example for 'crm.team' model for returned importable_fields:: [ {'name': 'message_ids', 'string': 'Messages', 'model_name': 'crm.team', 'comodel_name': 'mail.message', 'fields': [ {'name': 'moderation_status', 'string': 'Moderation Status', 'model_name': 'mail.message', 'fields': []}, {'name': 'body', 'string': 'Contents', 'model_name': 'mail.message', 'fields' : []} ]}, {{'name': 'name', 'string': 'Sales Team', 'model_name': 'crm.team', 'fields' : []} ] :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.has_headers), returned ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: ``{fields, matches, headers, preview} | {error, preview}`` :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/base_import
VERSION
VERSION 2.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Xavier Morel, Aaron Bohy, qsm-odoo, Odoo Online, Jorge Pinna Puissant, Romeo Fragomeli, Anh Thao Pham (pta), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Duckerts-Antoine, Pierre Paridans, aliya, Hubert Van De Walle, luvi, Renaud Thiry, Julien Banken, Vincent Larcin, alsh-odoo, Louis Wicket (wil), amdi-odoo, Levi Siuzdak (sile), Dylan Kiss (dyki), Sanket Brahmbhatt, Antoine (ande), Chong Wang (cwg), omra-odoo, Walid (wasa), Ethan Vincent, jorv-odoo, Mohamed GadAlrab, Bastien Fafchamps (bafa), Julien Carion (juca), Louis (wil), Pierre Lamotte (pila), Bastien PIERRE, Krzysztof Magusiak (krma), Saurabh
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:55
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • execute_import(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys: ``type`` the type of error (``error|warning``) ``message`` the error message associated with the error (a string) ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields_tree(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of :class:`Field`: .. class:: Field .. attribute:: id: str A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name: str The field's logical (Odoo) name within the scope of its parent. .. attribute:: string: str The field's human-readable name (``@string``) .. attribute:: required: bool Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields: list[Field] The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. .. attribute:: model_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's model. .. attribute:: comodel_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's comodel, i.e. if the field is a relation field. Structure example for 'crm.team' model for returned importable_fields:: [ {'name': 'message_ids', 'string': 'Messages', 'model_name': 'crm.team', 'comodel_name': 'mail.message', 'fields': [ {'name': 'moderation_status', 'string': 'Moderation Status', 'model_name': 'mail.message', 'fields': []}, {'name': 'body', 'string': 'Contents', 'model_name': 'mail.message', 'fields' : []} ]}, {{'name': 'name', 'string': 'Sales Team', 'model_name': 'crm.team', 'fields' : []} ] :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.has_headers), returned ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: ``{fields, matches, headers, preview} | {error, preview}`` :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/base_import
VERSION
VERSION 2.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Xavier Morel, Damien Bouvy, qsm-odoo, Odoo Online, Xavier-Do, Anh Thao Pham (pta), Samuel Degueldre, Achraf (abz), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Duckerts-Antoine, Pierre Paridans, Guillaume (guva), Arnaud Baes, aliya, Abdelouahab (abla), Hubert Van De Walle, luvi, Renaud Thiry, Archana Vaghasiya, alsh-odoo, Louis Wicket (wil), amdi-odoo, Saurabh Choraria, Levi Siuzdak (sile), Dylan Kiss (dyki), Sanket Brahmbhatt, Antoine (ande), Michael (mcm), micheledic, Mahdi Cheikh Rouhou (macr), Walid (wasa), Ethan Vincent, jorv-odoo, Mohamed GadAlrab, Bastien Fafchamps (bafa), Julien Carion (juca), Chrysanthe (chgo), Louis (wil), Pierre Pulinckx (pipu), Saurabh
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • execute_import(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys: ``type`` the type of error (``error|warning``) ``message`` the error message associated with the error (a string) ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields_tree(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of :class:`Field`: .. class:: Field .. attribute:: id: str A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name: str The field's logical (Odoo) name within the scope of its parent. .. attribute:: string: str The field's human-readable name (``@string``) .. attribute:: required: bool Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields: list[Field] The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. .. attribute:: model_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's model. .. attribute:: comodel_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's comodel, i.e. if the field is a relation field. Structure example for 'crm.team' model for returned importable_fields:: [ {'name': 'message_ids', 'string': 'Messages', 'model_name': 'crm.team', 'comodel_name': 'mail.message', 'fields': [ {'name': 'moderation_status', 'string': 'Moderation Status', 'model_name': 'mail.message', 'fields': []}, {'name': 'body', 'string': 'Contents', 'model_name': 'mail.message', 'fields' : []} ]}, {{'name': 'name', 'string': 'Sales Team', 'model_name': 'crm.team', 'fields' : []} ] :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.has_headers), returned ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: ``{fields, matches, headers, preview} | {error, preview}`` :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/base_import
VERSION
VERSION 2.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Xavier Morel, Géry Debongnie, Aaron Bohy, Lucas Perais (lpe), Jorge Pinna Puissant, Romeo Fragomeli, Victor Feyens, Julien Mougenot, Samuel Degueldre, std-odoo, Tiffany Chang (tic), Gorash, Stanislas Sobieski, Hubert Van de Walle (huvw), aliya, Walid HANNICHE (waha), John Laterre (jol), Adrien Minet, Antoine Vandevenne (anv), Saurabh Choraria, Sanket Brahmbhatt, Antoine (ande), Michael (mcm), Chong Wang (cwg), micheledic, Mahdi Cheikh Rouhou (macr), jorv-odoo, Mohamed GadAlrab, Martin Trigaux (mat)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • execute_import(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys: ``type`` the type of error (``error|warning``) ``message`` the error message associated with the error (a string) ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields_tree(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of :class:`Field`: .. class:: Field .. attribute:: id: str A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name: str The field's logical (Odoo) name within the scope of its parent. .. attribute:: string: str The field's human-readable name (``@string``) .. attribute:: required: bool Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields: list[Field] The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. .. attribute:: model_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's model. .. attribute:: comodel_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's comodel, i.e. if the field is a relation field. Structure example for 'crm.team' model for returned importable_fields:: [ {'name': 'message_ids', 'string': 'Messages', 'model_name': 'crm.team', 'comodel_name': 'mail.message', 'fields': [ {'name': 'moderation_status', 'string': 'Moderation Status', 'model_name': 'mail.message', 'fields': []}, {'name': 'body', 'string': 'Contents', 'model_name': 'mail.message', 'fields' : []} ]}, {{'name': 'name', 'string': 'Sales Team', 'model_name': 'crm.team', 'fields' : []} ] :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.has_headers), returned ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: ``{fields, matches, headers, preview} | {error, preview}`` :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/base_import
VERSION
VERSION 2.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Thibault Delavallée, Xavier Morel, Aaron Bohy, Adrien Dieudonne, Jorge Pinna Puissant, Aurélien Warnon, Xavier-Do, Victor Feyens, Moisés López, Sébastien Theys, alt-odoo, Julien Mougenot, std-odoo, Achraf (abz), David Beguin, Tiffany Chang (tic), Stanislas Sobieski, Hubert Van de Walle (huvw), Hardik Prajapati, Adrien Minet, Francois (fge), Saurabh Choraria, Sanket Brahmbhatt, Antoine (ande), Mahdi Cheikh Rouhou (macr), Mohamed GadAlrab, Falco Bolger
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • execute_import(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys: ``type`` the type of error (``error|warning``) ``message`` the error message associated with the error (a string) ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields_tree(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of :class:`Field`: .. class:: Field .. attribute:: id: str A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name: str The field's logical (Odoo) name within the scope of its parent. .. attribute:: string: str The field's human-readable name (``@string``) .. attribute:: required: bool Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields: list[Field] The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. .. attribute:: model_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's model. .. attribute:: comodel_name: str Used in the Odoo Field Tooltip on the import view and to get the model of the field of the related field(s). Name of the current field's comodel, i.e. if the field is a relation field. Structure example for 'crm.team' model for returned importable_fields:: [ {'name': 'message_ids', 'string': 'Messages', 'model_name': 'crm.team', 'comodel_name': 'mail.message', 'fields': [ {'name': 'moderation_status', 'string': 'Moderation Status', 'model_name': 'mail.message', 'fields': []}, {'name': 'body', 'string': 'Contents', 'model_name': 'mail.message', 'fields' : []} ]}, {{'name': 'name', 'string': 'Sales Team', 'model_name': 'crm.team', 'fields' : []} ] :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.has_headers), returned ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: ``{fields, matches, headers, preview} | {error, preview}`` :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYHidden/Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Olivier Dony, Christophe Simonis, Xavier Morel, Richard Mathot, Aaron Bohy, Yannick Tivisse, Julien Castiaux, Xavier-Do, jvm-odoo, jerome hanke (jhk), Victor Feyens, Moisés López, alt-odoo, Julien Mougenot, Achraf (abz), Mathieu Duckerts-Antoine, Hubert Van de Walle (huvw), Hardik Prajapati, Sanket Brahmbhatt
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:28
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
qunit_suite base_import_tests ir.ui.view qweb Inherits web.qunit_suite_tests
Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • do(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys ``type`` the type of error (``error|warning``); ``message`` the error message associated with the error (a string) and ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of ``Field``, with ``Field`` defined as: .. class:: Field .. attribute:: id (str) A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name (str) The field's logical (Odoo) name within the scope of its parent. .. attribute:: string (str) The field's human-readable name (``@string``) .. attribute:: required (bool) Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields (list(Field)) The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.headers), ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: {fields, matches, headers, preview} | {error, preview} :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYTools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Christophe Simonis, Xavier Morel, Richard Mathot, Géry Debongnie, Aaron Bohy, Jeremy Kersten, Damien Bouvy, Yannick Tivisse, Martin Geubelle, Odoo Online, Jorge Pinna Puissant, Adrian Torres, mreficent, Julien Castiaux, Xavier-Do, jvm-odoo, jerome hanke (jhk), Victor Feyens, Moisés López, alt-odoo, fw-bot, jbm-odoo, Hubert Van de Walle (huvw)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
qunit_mobile_suite base_import_mobile_tests ir.ui.view qweb Inherits web.qunit_mobile_suite
qunit_suite base_import_tests ir.ui.view qweb Inherits web.qunit_suite
Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    attachment=False help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • do(self, fields, columns, options, dryrun=False)
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys ``type`` the type of error (``error|warning``); ``message`` the error message associated with the error (a string) and ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of ``Field``, with ``Field`` defined as: .. class:: Field .. attribute:: id (str) A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name (str) The field's logical (Odoo) name within the scope of its parent. .. attribute:: string (str) The field's human-readable name (``@string``) .. attribute:: required (bool) Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields (list(Field)) The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.headers), ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: {fields, matches, headers, preview} | {error, preview} :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYExtra Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Olivier Dony, Christophe Simonis, David Monjoie, Xavier Morel, Nicolas Martinelli, xmo-odoo, Richard Mathot, Géry Debongnie, Aaron Bohy, GitHub, Lucas Perais (lpe), Yannick Tivisse, qsm-odoo, Adrien Dieudonne, Jorge Pinna Puissant, Nans Lefebvre, mreficent, Julien Castiaux, Xavier-Do, jvm-odoo, Victor Feyens, Moisés López, alt-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
qunit_mobile_suite base_import_mobile_tests ir.ui.view qweb Inherits web.qunit_mobile_suite
qunit_suite base_import_tests ir.ui.view qweb Inherits web.qunit_suite
Models touched (4)

New fields (0)

No new fields.

Public methods (1)
  • get_import_templates(self)
    @api.model
    Get the import templates label and path. :return: a list(dict) containing label and template path like ``[{'label': 'foo', 'template': 'path'}]``

New fields (4)
  • file Binary
    help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • do(self, fields, columns, options, dryrun=False)
    @api.multi
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param columns: columns label :type columns: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys ``type`` the type of error (``error|warning``); ``message`` the error message associated with the error (a string) and ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: dict(ids: list(int), messages: list({type, message, record}))
  • get_fields(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of ``Field``, with ``Field`` defined as: .. class:: Field .. attribute:: id (str) A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name (str) The field's logical (Odoo) name within the scope of its parent. .. attribute:: string (str) The field's human-readable name (``@string``) .. attribute:: required (bool) Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields (list(Field)) The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. :param str model: name of the model to get fields form :param int depth: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    @api.multi
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.headers), ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {quoting, separator, headers} :type options: {str, str, str, bool} :returns: {fields, matches, headers, preview} | {error, preview} :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}

New fields (3)
  • column_name Char
  • field_name Char
  • res_model Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/11.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYExtra Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Olivier Dony, Christophe Simonis, Xavier Morel, Nicolas Martinelli, Nicolas Lempereur, Aaron Bohy, ged-odoo, GitHub, Yannick Tivisse, Odoo Online, Julien Castiaux, jvm-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:53:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement Odoo's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
qunit_suite base_import_tests ir.ui.view qweb Inherits web.qunit_suite
Models touched (1)

New fields (4)
  • file Binary
    help='File to check and/or import, raw binary (not base64)' args: 'File'
  • file_name Char
    args: 'File Name'
  • file_type Char
    args: 'File Type'
  • res_model Char
    args: 'Model'
Public methods (3)
  • do(self, fields, options, dryrun=False)
    @api.multi
    Actual execution of the import :param fields: import mapping: maps each column to a field, ``False`` for the columns to ignore :type fields: list(str|bool) :param dict options: :param bool dryrun: performs all import operations (and validations) but rollbacks writes, allows getting as much errors as possible without the risk of clobbering the database. :returns: A list of errors. If the list is empty the import executed fully and correctly. If the list is non-empty it contains dicts with 3 keys ``type`` the type of error (``error|warning``); ``message`` the error message associated with the error (a string) and ``record`` the data which failed to import (or ``false`` if that data isn't available or provided) :rtype: list({type, message, record})
  • get_fields(self, model, depth=FIELDS_RECURSION_LIMIT)
    @api.model
    Recursively get fields for the provided model (through fields_get) and filter them according to importability The output format is a list of ``Field``, with ``Field`` defined as: .. class:: Field .. attribute:: id (str) A non-unique identifier for the field, used to compute the span of the ``required`` attribute: if multiple ``required`` fields have the same id, only one of them is necessary. .. attribute:: name (str) The field's logical (Odoo) name within the scope of its parent. .. attribute:: string (str) The field's human-readable name (``@string``) .. attribute:: required (bool) Whether the field is marked as required in the model. Clients must provide non-empty import values for all required fields or the import will error out. .. attribute:: fields (list(Field)) The current field's subfields. The database and external identifiers for m2o and m2m fields; a filtered and transformed fields_get for o2m fields (to a variable depth defined by ``depth``). Fields with no sub-fields will have an empty list of sub-fields. :param str model: name of the model to get fields form :param int landing: depth of recursion into o2m fields
  • parse_preview(self, options, count=10)
    @api.multi
    Generates a preview of the uploaded files, and performs fields-matching between the import's file data and the model's columns. If the headers are not requested (not options.headers), ``matches`` and ``headers`` are both ``False``. :param int count: number of preview lines to generate :param options: format-specific options. CSV: {encoding, quoting, separator, headers} :type options: {str, str, str, bool} :returns: {fields, matches, headers, preview} | {error, preview} :rtype: {dict(str: dict(...)), dict(int, list(str)), list(str), list(list(str))} | {str, str}
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/10.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYExtra Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, David Monjoie, Goffin Simon, Cedric Snauwaert, Nicolas Martinelli, Jérome Maes, Julien Legros, qdp-odoo, Jeremy Kersten, amoyaux
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:50:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for Odoo
======================================

Re-implement openerp's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of Odoo who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/9.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYExtra Tools
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Christophe Matthieu, Martin Trigaux, Fabien Pinckaers, Antony Lesuisse, Olivier Dony, Denis Ledoux, Christophe Simonis, Xavier Morel, Nicolas Martinelli, Nicolas Lempereur, Richard Mathot, Géry Debongnie, Aaron Bohy, Yannick Tivisse
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:48:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for OpenERP
======================================

Re-implement openerp's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of OpenERP who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/8.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSOdoo Translation Bot, Christophe Matthieu, Martin Trigaux, Fabien Pinckaers, Antony Lesuisse, Olivier Dony, Thibault Delavallée, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Denis Ledoux, Fabien Meghazi, Christophe Simonis, Xavier Morel, Kersten Jeremy, Nicolas Lempereur, Richard Mathot, Yogesh Parekh, Jeremy Kersten, ima-openerp
WEBSITE
WEBSITEhttps://www.odoo.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:45:39
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for OpenERP
======================================

Re-implement openerp's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of OpenERP who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
assets_backend base_import assets ir.ui.view qweb Inherits web.assets_backend
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/7.0/base_import
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSTwinkle Christian (OpenERP), Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Antony Lesuisse, Olivier Dony, Vo Minh Thu, Launchpad Translations on behalf of openerp, Denis Ledoux, Fabien Meghazi, Xavier Morel, dle@openerp.com, Frédéric van der Essen, Vijaykumar Baladaniya, Phil Frost, Jigar Amin, chirag patel
WEBSITE
WEBSITEhttp://www.openerp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:43:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
New extensible file import for OpenERP
======================================

Re-implement openerp's file import system:

* Server side, the previous system forces most of the logic into the
  client which duplicates the effort (between clients), makes the
  import system much harder to use without a client (direct RPC or
  other forms of automation) and makes knowledge about the
  import/export system much harder to gather as it is spread over
  3+ different projects.

* In a more extensible manner, so users and partners can build their
  own front-end to import from other file formats (e.g. OpenDocument
  files) which may be simpler to handle in their work flow or from
  their data production sources.

* In a module, so that administrators and users of OpenERP who do not
  need or want an online import can avoid it being available to users.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (0)

No models found for this module.