|
| 1 | +=================== |
| 2 | +Asynchronous Import |
| 3 | +=================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:e7bcaae80fd59cc8e45b2784606eb026fba7dfcac892ad4a986f51e0dc248e1e |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Production/Stable |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/queue/tree/18.0/base_import_async |
| 21 | + :alt: OCA/queue |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-base_import_async |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=18.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module extends the standard CSV import functionality to import |
| 32 | +files in the background using the OCA/queue framework. |
| 33 | + |
| 34 | +**Table of contents** |
| 35 | + |
| 36 | +.. contents:: |
| 37 | + :local: |
| 38 | + |
| 39 | +Usage |
| 40 | +===== |
| 41 | + |
| 42 | +The user is presented with a new checkbox in the import screen. When |
| 43 | +selected, the import is delayed in a background job. |
| 44 | + |
| 45 | +This job in turn splits the CSV file in chunks of minimum 100 lines (or |
| 46 | +more to align with record boundaries). Each chunk is then imported in a |
| 47 | +separate background job. |
| 48 | + |
| 49 | +When an import fails, the job is marked as such and the user can read |
| 50 | +the error in the job status. The CSV chunk being imported is stored as |
| 51 | +an attachment to the job, making it easy to download it, fix it and run |
| 52 | +a new import, possibly in synchronous mode since the chunks are small. |
| 53 | + |
| 54 | +Any file that can be imported by the standard import mechanism can also |
| 55 | +be imported in the background. |
| 56 | + |
| 57 | +This module's scope is limited to making standard imports asynchronous. |
| 58 | +It does not attempt to transform the data nor automate ETL flows. |
| 59 | + |
| 60 | +Other modules may benefit from this infrastructure in the following way |
| 61 | +(as illustrated in the test suite): |
| 62 | + |
| 63 | +1. create an instance of base_import.import and populate its fields |
| 64 | + (res_model, file, file_name), |
| 65 | +2. invoke the do method with appropriate options (header, encoding, |
| 66 | + separator, quoting, use_queue, chunk_size). |
| 67 | + |
| 68 | +Known issues / Roadmap |
| 69 | +====================== |
| 70 | + |
| 71 | +- There is currently no user interface to control the chunk size, which |
| 72 | + is currently 100 by default. Should this proves to be an issue, it is |
| 73 | + easy to add an option to extend the import screen. |
| 74 | +- Validation cannot be run in the background. |
| 75 | + |
| 76 | +Changelog |
| 77 | +========= |
| 78 | + |
| 79 | +13.0.1.0.0 (2019-12-20) |
| 80 | +----------------------- |
| 81 | + |
| 82 | +- [MIGRATION] from 12.0 branched at rev. a7f8031 |
| 83 | + |
| 84 | +Bug Tracker |
| 85 | +=========== |
| 86 | + |
| 87 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_. |
| 88 | +In case of trouble, please check there if your issue has already been reported. |
| 89 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 90 | +`feedback <https://github.com/OCA/queue/issues/new?body=module:%20base_import_async%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 91 | + |
| 92 | +Do not contact contributors directly about support or help with technical issues. |
| 93 | + |
| 94 | +Credits |
| 95 | +======= |
| 96 | + |
| 97 | +Authors |
| 98 | +------- |
| 99 | + |
| 100 | +* Akretion |
| 101 | +* ACSONE SA/NV |
| 102 | + |
| 103 | +Contributors |
| 104 | +------------ |
| 105 | + |
| 106 | +Sébastien Beau (Akretion) authored the initial prototype. |
| 107 | + |
| 108 | +Stéphane Bidoul (ACSONE) extended it to version 1.0 to support |
| 109 | +multi-line records, store data to import as attachments and let the user |
| 110 | +control the asynchronous behaviour. |
| 111 | + |
| 112 | +Other contributors include: |
| 113 | + |
| 114 | +- Anthony Muschang (ACSONE) |
| 115 | + |
| 116 | +- David Béal (Akretion) |
| 117 | + |
| 118 | +- Jonathan Nemry (ACSONE) |
| 119 | + |
| 120 | +- Laurent Mignon (ACSONE) |
| 121 | + |
| 122 | +- Dennis Sluijk (Onestein) |
| 123 | + |
| 124 | +- Guewen Baconnier (Camptocamp) |
| 125 | + |
| 126 | +- `Trobz <https://trobz.com>`__: |
| 127 | + |
| 128 | + - Dzung Tran <dungtd@trobz.com> |
| 129 | + - Do Anh Duy <duyda@trobz.com> |
| 130 | + |
| 131 | +- Daniel Duque (FactorLibre) |
| 132 | + |
| 133 | +Other credits |
| 134 | +------------- |
| 135 | + |
| 136 | +The migration of this module from 17.0 to 18.0 was financially supported |
| 137 | +by Camptocamp |
| 138 | + |
| 139 | +Maintainers |
| 140 | +----------- |
| 141 | + |
| 142 | +This module is maintained by the OCA. |
| 143 | + |
| 144 | +.. image:: https://odoo-community.org/logo.png |
| 145 | + :alt: Odoo Community Association |
| 146 | + :target: https://odoo-community.org |
| 147 | + |
| 148 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 149 | +mission is to support the collaborative development of Odoo features and |
| 150 | +promote its widespread use. |
| 151 | + |
| 152 | +This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/18.0/base_import_async>`_ project on GitHub. |
| 153 | + |
| 154 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments