Asynchronous Importby Akretion https://github.com/OCA/queue , ACSONE SA/NV https://github.com/OCA/queue , Odoo Community Association (OCA) https://github.com/OCA/queue
|Also available in version||v 12.0 v 11.0 v 8.0 v 13.0|
Odoo Asynchronous import module
This module extends the standard CSV import functionality to import files in the background using the OCA/connector framework.
The user is presented with a new checkbox in the import screen. When selected, the import is delayed in a background job.
This job in turn splits the CSV file in chunks of minimum 100 lines (or more to align with record boundaries). Each chunk is then imported in a separate background job.
When an import fails, the job is marked as such and the user can read the error in the job status. The CSV chunk being imported is stored as an attachment to the job, making it easy to download it, fix it and run a new import, possibly in synchronous mode since the chunks are small.
Any file that can be imported by the standard import mechanism can also be imported in the background.
This module's scope is limited to making standard imports asynchronous. It does not attempt to transform the data nor automate ETL flows.
Other modules may benefit from this infrastructure in the following way (as illustrated in the test suite):
- create an instance of base_import.import and populate its fields (res_model, file, file_name),
- invoke the do method with appropriate options (header, encoding, separator, quoting, use_connector, chunk_size).
Known issues / Roadmap
- There is currently no user interface to control the chunk size, which is currently 100 by default. Should this proves to be an issue, it is easy to add an option to extend the import screen.
- Validation cannot be run in the background.
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
Sébastien Beau (Akretion) authored the initial prototype.
Stéphane Bidoul (ACSONE) extended it to version 1.0 to support multi-line records, store data to import as attachments and let the user control the asynchronous behaviour.
Other contributors include:
- Anthony Muschang (ACSONE)
- David Béal (Akretion)
- Jonathan Nemry (ACSONE)
- Laurent Mignon (ACSONE)
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.