Search 1.9 billion lines of Odoo code on GitHub

base_import_async

Author: Akretion, ACSONE SA/NV, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0
Repository: ACCOMODATA-BVBA/queue
Dependencies: base_import, queue_job, and web
Languages: HTML (394, 51.1%), JavaScript (27, 3.5%), Python (177, 23.0%), XML (51, 6.6%), and reStructuredText (122, 15.8%)
Other branches: 11.0, 12.0, and 12.0-PR_102
Other repositories: 001101/connector-interfaces, 001101/queue, 2FM/queue, AITIC/queue, Alfa-90/queue, Callino/queue, Change2improve/connector-interfaces, Change2improve/queue, ChinaShrimp/queue, ClearCorp/oca-connector-interfaces, Comunitea/queue, DamonLiu0814/queue, Dhirendrasinh-SerpentCS/queue, Digital5-Odoo/queue, ERPLibre/connector-interfaces, ERPLibre/queue, Endika/connector-interfaces, ForgeFlow/queue, GSLabIt/queue, Gabinete-Digital/queue, Ingeos/queue, Jarsa/queue, KolushovAlexandr/queue, LL-Akeera/connector-interfaces, LasLabs/connector-interfaces, Leuan12/queue, MathBenTech/queue, MediaJockey/queue, MjAbuz/connector-interfaces, MjAbuz/queue, NachoAlesLopez/queue, NeatNerdPrime/connector-interfaces, NeatNerdPrime/queue, Numigi/queue, OCA-MUK/queue, OCA/connector-interfaces, OCA/queue, OdooBulgaria/connector-interfaces, OdooMod/connector-interfaces, OpenAT/queue, OutillageStEtienne/connector-interfaces, RRRoger/queue, RSC-TECHNOLOGY-CI/queue, RealSolutionsLux/connector-interfaces, RealSolutionsLux/queue, SanteLibre/queue, SequarSrl/queue, SeuMarco/connector-interfaces, SeuMarco/queue, SuperMeepBoy/queue, Syci-Consulting/queue, TRESCLOUD/queue, Tatider/queue, Tecnativa/queue, Tonow-c2c/connector-interfaces, Trust-Code/queue, UnknownInfo/connector-interfaces, VCLS-org/queue, Vauxoo/queue, VisiionSolucionesTecnologicas/connector-interfaces, VisiionSolucionesTecnologicas/queue, aacceess75/connector-interfaces, acsone/connector-interfaces, acsone/queue, agilebg/connector-interfaces, akretion/connector-interfaces, akretion/queue, algiopensource/queue, alsor62/queue, altanmur/queue, amendoncabh/connector-interfaces, anggadjava/queue, anhvu-sg/queue, anthony-muschang/connector-interfaces, apachesep/connector-interfaces, apertoso/queue, apetbiz/connector-interfaces, apineux/queue, archetipo/connector-interfaces, atchuthan/queue, aurestic/connector-interfaces, aurestic/queue, bealdav/connector-interfaces, blueoceandevops/queue, bobslee/queue, bodi000/connector-interfaces, boskowski/odoo_oca_queue, brain-tec/connector-interfaces, brain-tec/queue, camptocamp/connector-interfaces, camptocamp/queue, celm1990/queue, cogitoweb/queue, contineolabs/queue, coopiteasy/queue, csveda/queue, danieltorres7/connector-interfaces, diagramsoftware/connector-interfaces, diggy128/queue, dingguijin/connector-interfaces, dndoanh/queue, don-systems/connector-interfaces, dong-z/queue, druidoo-dev/queue, dsasoftware/connector-interfaces, dvitme/connector-interfaces, dynapps/queue, ecosoft-odoo/queue, ecosoft-odoo/rjc, eezee-it/connector-interfaces, eezee-it/queue, ehsu0407/queue, em230418/queue, etobella/queue, exosoftware/oca-queue, factorlibre/queue, florian-dacosta/queue, glovebx/queue, guewen/connector-interfaces, guewen/queue, gurneyalex/connector-interfaces, guwenfeng/queue, haroldtamo/connector-interfaces, hbrunn/connector-interfaces, hibou-io/oca-queue, hinfo506/queue, hpatelserpentcs/queue, hq8399/queue, hustlercoder/queue, hzwzw/queue, iRichGit/connector-interfaces, igor-mitin/queue, iledarn/connector-interfaces, ilyasbahridudak/queue, initOS/connector-interfaces, isoscl/connector-interfaces, isoscl/queue, it-projects-llc/connector-interfaces, jalaludin/connector-interfaces, jsilvestar/queue, kevin808/connector-interfaces, kingofsevens/queue, koble/connector-interfaces, leanhtuan1996/queue, lideritjnma/connector-interfaces, lideritjnma/queue, lincersolucoes/oca-queue, lithint/connector-interfaces, liulixia1990/connector-interfaces, liweijie0812/queue, loftwah/queue, lonelyleaves/queue, magnuscolors/connector-interfaces, magnuscolors/queue, manolain/connector-interfaces, marcelsavegnago/queue, mauraco-group/queue, maykonAguiar/queue, mmequignon/connector-interfaces, molandtoxx/connector-interfaces, mozaik-association/queue, mpanarin/connector-interfaces, nadiaafa/queue, nilshamerlinck/queue, nucleoosystem/connector-interfaces, odoobgorg/OCA-connector-interfaces, omalbastin/queue, one2pret/connector-interfaces, one2pret/queue, ossamagharib/connector-interfaces, phatdo-novobi/queue, popcomputadores-desenv/queue, praxigento/oca-queue, prbo/connector-interfaces, profumang/queue, pscloud/connector-interfaces, pscloud/queue, qq470647251/connector-interfaces, qtheuret/queue, raizs/queue, resultrum/connector-interfaces, rlfss/queue, robotiko/connector-interfaces, rossasa/connector-interfaces, roussel2nis/connector-interfaces, royalline1/queue, rschnapka/connector-interfaces, sadeqamin/connector-interfaces, sahil-navadiya/queue, sanube/connector-interfaces, sanube/queue, savoirfairelinux/connector-interfaces, sebalix/connector-interfaces, sewisoft/queue, shengyf1/queue, simahawk/connector-interfaces, simahawk/queue, sotsam/queue, steingabelgaard/queue, stephen144/connector-interfaces, sunflowerit/queue, sunshineLhj/queue, tajawal/connector-interfaces, tajawal/queue, takinobori/oca-queue, tarteo/queue, tegin/queue, telesoho/queue, thanhchatvn/queue, themreza/queue, thoongnv/queue, tirma-sa/queue, tschanzt/connector-interfaces, unitek-solusi/OCA-queue, ursais/connector-interfaces, ursais/queue, vdedyukhin/connector-interfaces, versada/queue, vijay-erpharbor/queue, vinaybhawsar/connector-interfaces, vnsofthe/queue, vrenaville/queue, westlyou/queue-1, wjshan/queue, wty0512/queue, x0rzkov/odoo-connector-interfaces, x0rzkov/odoo-queue, xcgd/queue, xwh123807/queue, yasmanycastillo/connector-interfaces, yelizariev/connector-interfaces, yucer/queue, yvaucher/connector-interfaces, zakiuu/connector-interfaces, zakiuu/queue, zhaohuaw/connector-interfaces, zhaowenzhe/queue, and zyyang/connector-interfaces

<h1 class="title">Asynchronous Import</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/queue/tree/14.0/base_import_async"><img alt="OCA/queue" src="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-base_import_async"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/230/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module extends the standard CSV import functionality to import files in the background using the OCA/queue framework.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li> <li><a class="reference internal" href="#changelog" id="id4">Changelog</a></li> <li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id6">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id7">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h2><a class="toc-backref" href="#id2">Usage</a></h2> <p>The user is presented with a new checkbox in the import screen. When selected, the import is delayed in a background job.</p> <p>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.</p> <p>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.</p> <p>Any file that can be imported by the standard import mechanism can also be imported in the background.</p> <p>This module's scope is limited to making standard imports asynchronous. It does not attempt to transform the data nor automate ETL flows.</p> <p>Other modules may benefit from this infrastructure in the following way (as illustrated in the test suite):</p> <ol class="arabic simple"> <li>create an instance of <cite>base_import.import</cite> and populate its fields (<cite>res_model</cite>, <cite>file</cite>, <cite>file_name</cite>),</li> <li>invoke the <cite>do</cite> method with appropriate options (<cite>header</cite>, <cite>encoding</cite>, <cite>separator</cite>, <cite>quoting</cite>, <cite>use_queue</cite>, <cite>chunk_size</cite>).</li> </ol> <a name="known-issues-roadmap"></a> <h2><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h2> <ul class="simple"> <li>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.</li> <li>Validation cannot be run in the background.</li> </ul> <a name="changelog"></a> <h2 class="with-subtitle"><a class="toc-backref" href="#id4">Changelog</a></h2> <h2 class="section-subtitle" id="id1"><span class="section-subtitle">13.0.1.0.0 (2019-12-20)</span></h2> <ul class="simple"> <li>[MIGRATION] from 12.0 branched at rev. a7f8031</li> </ul> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id5">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/queue/issues">GitHub Issues</a>. 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 <a class="reference external" href="https://github.com/OCA/queue/issues/new?body=module:%20base_import_async%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id6">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id7">Authors</a></h3> <ul class="simple"> <li>Akretion</li> <li>ACSONE SA/NV</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id8">Contributors</a></h3> <p>Sébastien Beau (Akretion) authored the initial prototype.</p> <p>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.</p> <p>Other contributors include:</p> <ul class="simple"> <li>Anthony Muschang (ACSONE)</li> <li>David Béal (Akretion)</li> <li>Jonathan Nemry (ACSONE)</li> <li>Laurent Mignon (ACSONE)</li> <li>Dennis Sluijk (Onestein)</li> <li>Guewen Baconnier (Camptocamp)</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id9">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>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.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/queue/tree/14.0/base_import_async">OCA/queue</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>