Search 1.9 billion lines of Odoo code on GitHub

stock_scanner

Author: Subteno IT,ACSONE SA/NV,Odoo Community Association (OCA)
License: AGPL-3
Branch: 12.0
Repository: Abranes/stock-logistics-barcode
Dependencies: base_sparse_field, product, and stock
Languages: PO File (10645, 78.9%), Python (2078, 15.4%), XML (616, 4.6%), and reStructuredText (160, 1.2%)
Other branches: 10.0, 11.0, and 9.0
Other repositories: AITIC/stock-logistics-workflow, AMhadhbi/stock-logistics-barcode, AbdulrhmanGad/stock-logistics-workflow, AdrianoDBA/stock-logistics-workflow, Alfa-90/stock-logistics-workflow, AnilKesariya/stock-logistics-workflow, Anon234/stock-logistics-barcode, Aris7189/stock-logistics-barcode, BT-cserra/stock-logistics-workflow, BenjaHe/stock-logistics-workflow, BradooTech/stock-logistics-workflow, ChanFeei/stock-logistics-barcode, Change2improve/stock-logistics-barcode, Change2improve/stock-logistics-workflow, CiroBoxHub/stock-logistics-workflow, ClearCorp/oca-stock-logistics-barcode, ClearCorp/oca-stock-logistics-workflow, ComitorDevTeam/stock-logistics-workflow, Comunitea/stock-logistics-workflow, DamonLiu0814/stock-logistics-workflow, DanielAlba/stock-logistics-workflow, Darknroses/stock-logistics-barcode, Darknroses/stock-logistics-workflow, Deanzou/stock-logistics-barcode, Dobtor-OCA/stock-logistics-barcode, Dobtor-OCA/stock-logistics-workflow, ElvenStudio/stock-logistics-workflow, Enriqueperezg/stock-logistics-workflow, FaTaToo/stock-logistics-workflow, Faha4/stock-logistics-workflow, ForgeFlow/stock-logistics-barcode, ForgeFlow/stock-logistics-workflow, GSLabIt/stock-logistics-workflow, Gabinete-Digital/stock-logistics-barcode, Gabinete-Digital/stock-logistics-workflow, Geert82/stock-logistics-workflow, Gofekra/stock-logistics-barcode, Gofekra/stock-logistics-workflow, GrupoAlicor/stock-logistics-workflow, GrupoAlvamex/stock-logistics-workflow, Guobower/OCA-stock-logistics-workflow, Guobower/stock-logistics-barcode, HMarcien/stock-logistics-workflow, Hasnur/stock-logistics-barcode, Ingeos/stock-logistics-barcode, Ingeos/stock-logistics-workflow, Jarsa/stock-logistics-barcode, Jarsa/stock-logistics-workflow, JavierMarhuenda/stock-logistics-workflow, Jeisonpernia/stock-logistics-workflow, JibenCL/stock-logistics-barcode, JibenCL/stock-logistics-workflow, JorgeJuarezM/stock-logistics-barcode, JuanjoA/stock-logistics-barcode, JulioSerna/stock-logistics-barcode, KT-Thanate/stock-logistics-barcode, LasLabs/stock-logistics-barcode, LevelPrime/stock-logistics-barcode, LevelPrime/stock-logistics-workflow, MariajMesa/stock-logistics-barcode, MeetKD/stock-logistics-barcode, Mefistous/stock-logistics-workflow, MindAndGo/stock-logistics-barcode, NeatNerdPrime/stock-logistics-barcode, NeatNerdPrime/stock-logistics-workflow, Nikul-Chaudhary/stock-logistics-workflow, OCA-MUK/stock-logistics-barcode, OCA-MUK/stock-logistics-workflow, OCA/stock-logistics-barcode, OCA/stock-logistics-workflow, Objectif-PI/stock_scanner, Odoo-Italia-Associazione/stock-logistics-workflow, Olageibol/stock-logistics-barcode, OmniaGit/stock-logistics-workflow, OmniaSolutions/stock-logistics-workflow, OpenPymeMx/stock-logistics-workflow, OutillageStEtienne/stock-logistics-barcode, PESOL/stock-logistics-barcode, Pexego/stock-logistics-workflow, PlanetaTIC/stock-logistics-workflow, PythonwithPramod/stock-logistics-workflow, QANSEE/stock-logistics-workflow, QubiQ/stock-logistics-barcode, QubiQ/stock-logistics-workflow, Rad0van/stock-logistics-workflow, RealSolutionsLux/stock-logistics-barcode, SDIsl/stock-logistics-workflow, SSISoftware/stock-logistics-barcode, SequarSrl/stock-logistics-workflow, SerpentCS/stock-logistics-workflow, SeuMarco/stock-logistics-barcode, SeuMarco/stock-logistics-workflow, SimoRubi/stock-logistics-barcode, SimoRubi/stock-logistics-workflow, Studio73/stock-logistics-barcode, Studio73/stock-logistics-workflow, TDu/stock-logistics-workflow, TRESCLOUD/stock-logistics-barcode, TRESCLOUD/stock-logistics-workflow, Tecnativa/stock-logistics-barcode, Tecnativa/stock-logistics-workflow, VanMoof/stock-logistics-workflow, Vauxoo/stock-logistics-barcode, VisiionSoluciones/stock-logistics-workflow, VisiionSolucionesTecnologicas/stock-logistics-barcode, VisiionSolucionesTecnologicas/stock-logistics-workflow, VizThoughts/stock_scanner, WohthaN/stock-logistics-workflow, Xerpas/stock-logistics-workflow, aacceess75/stock-logistics-barcode, aaltinisik/stock-logistics-barcode, aaltinisik/stock-logistics-workflow, abaghirli/stock-logistics-workflow, abstract-open-solutions/stock-logistics-workflow, acsone/stock-logistics-barcode, acsone/stock-logistics-workflow, acsone/stock_scanner, adhoc-dev/stock-logistics-workflow, adolfoeliazat/stock-logistics-workflow, advancedinformaticsitaly/stock-logistics-workflow, agaldona/stock-logistics-workflow, agenterp/stock-logistics-barcode, ahmadproper/stock-logistics-workflow, aiedward/stock-logistics-workflow, aisopuro/stock-logistics-workflow, aitorbouzas/stock-logistics-workflow, akretion/stock-logistics-barcode, akretion/stock-logistics-workflow, alessandrocamilli/stock-logistics-workflow, algiopensource/stock-logistics-workflow, amarcosg/stock-logistics-workflow, amarildogolloshi/stock-logistics-barcode, amendoncabh/stock-logistics-barcode, amendoncabh/stock-logistics-workflow, andhit-r/stock-logistics-workflow, andreasdsp/stock-logistics-workflow, andrius-preimantas/stock-logistics-workflow, angelmoya/stock-logistics-barcode, anhvu-sg/stock-logistics-barcode, anhvu-sg/stock-logistics-workflow, ansinaesmejor/stock-logistics-barcode, aospub/stock-logistics-barcode, aospub/stock-logistics-workflow, apachesep/stock-logistics-barcode, apachesep/stock-logistics-workflow, apertoso/stock-logistics-barcode, apetbiz/stock-logistics-barcode, apetbiz/stock-logistics-workflow, archeti-org/stock-logistics-barcode, asphaltzipper/stock-logistics-workflow, aurestic/stock-logistics-barcode, aurestic/stock-logistics-workflow, avanzosc/stock-logistics-workflow, avoinsystems/stock-logistics-workflow, bertontin/stock-logistics-barcode, bizzappdev/stock-logistics-workflow, bmya/stock-logistics-workflow, bodedra/stock-logistics-workflow, brain-tec/stock-logistics-workflow, bvkl/stock-logistics-barcode, camptocamp/stock-logistics-barcode, celm1990/stock-logistics-workflow, chenjingxiong/stock-logistics-workflow, chienandalu/stock-logistics-workflow, ck2001/stock-logistics-barcode, colima/stock_scanner, congdpt/stock-logistics-workflow, coopiteasy/stock-logistics-barcode, coopiteasy/stock-logistics-workflow, credativUK/stock-logistics-workflow, ctr-subteno-it/stock-logistics-barcode, cubells/stock-logistics-workflow, cvinh/stock-logistics-barcode, cyrilgdn/stock-logistics-workflow, damendieta/stock-logistics-workflow, dani-xtendoo/stock-logistics-barcode, dani-xtendoo/stock-logistics-workflow, daramousk/stock-logistics-barcode, daramousk/stock-logistics-workflow, darshan-odoo/stock-logistics-workflow, dcorio/stock-logistics-workflow, dgrej/stock-logistics-barcode, diagramsoftware/stock-logistics-barcode, diagramsoftware/stock-logistics-workflow, diegobgl/stock-logistics-workflow, diggy128/stock-logistics-workflow, dion-pci/stock-logistics-barcode, dion-pci/stock-logistics-workflow, dong-z/stock-logistics-barcode, dong-z/stock-logistics-workflow, dongzhixiang/stock-logistics-workflow, donizupnick/stock-logistics-workflow, druidoo-dev/stock-logistics-barcode, eLBati/stock-logistics-barcode, eLBati/stock-logistics-workflow, ecosoft-odoo/stock-logistics-barcode, ecosoft-odoo/stock-logistics-workflow, ehsu0407/stock-logistics-barcode, elhamdaoui/stock-logistics-workflow, emkayz/stock-logistics-barcode, emkayz/stock-logistics-workflow, espo-tony/stock-logistics-workflow, etobella/stock-logistics-workflow, exosoftware/oca-stock-logistics-workflow, factorlibre/stock-logistics-barcode, fanha99/stock-logistics-workflow, fauzi-tsani/stock-logistics-barcode, fmdl/stock-logistics-barcode, fmdl/stock-logistics-workflow, focusate/oca-stock-logistics-workflow, gabriele-baldessari/stock-logistics-workflow, gabrielo77/stock-logistics-workflow, gdrius/stock-logistics-workflow, germanponce/stock-logistics-workflow, gpmes/stock-logistics-workflow, grap/stock-logistics-barcode, grap/stock-logistics-workflow, grindtildeath/stock-logistics-workflow, guandalf/stock-logistics-workflow, gurneyalex/stock-logistics-barcode, gurneyalex/stock-logistics-workflow, gurneyalex/stock_scanner, gustavovalverde/stock-logistics-workflow, haroldtamo/stock-logistics-barcode, haryoran04/stock-logistics-barcode, haryoran04/stock-logistics-workflow, heymanh/stock-logistics-barcode, hibou-io/oca-stock-logistics-workflow, hinfo506/stock-logistics-barcode, hinfo506/stock-logistics-workflow, houssine78/stock-logistics-workflow, hurrinico/stock-logistics-workflow, i-vyshnevska/stock-logistics-workflow, iceship/stock-logistics-barcode, igallart/stock-logistics-workflow, imranissufo/stock-logistics-barcode, infoitservit/stock-logistics-barcode, initOS/stock-logistics-workflow, insscn/stock-logistics-workflow, isos/stock-logistics-workflow, isoscl/stock-logistics-barcode, isoscl/stock-logistics-workflow, it-projects-llc/stock-logistics-workflow, jado95/stock-logistics-workflow, jalaludin/stock-logistics-workflow, jasadmoozhiyan/stock-logistics-barcode, jchancafe/stock-logistics-barcode, jcoux/stock-logistics-workflow, jesus01x/stock-logistics-workflow, jilmer-roca/stock-logistics-workflow, jimhoefnagels/stock-logistics-barcode, jimhoefnagels/stock-logistics-workflow, josepmy/stock-logistics-workflow, kailIII/stock_scanner, kamran-ia/stock-logistics-workflow, kevin0120/stock-logistics-workflow, kevin070982/stock-logistics-barcode, kevin070982/stock-logistics-workflow, khariri/stock-logistics-workflow, kittiu/stock-logistics-workflow, kmee/stock-logistics-workflow, kos94ok-3D/stock-logistics-barcode, kos94ok-3D/stock-logistics-workflow, lavvy/stock_scanner, layounisl/stock-logistics-barcode, lbelorgey/stock-logistics-workflow, leangjia/stock-logistics-barcode, leemannd/stock-logistics-workflow, legalsylvain/stock-logistics-barcode, leolandeo/stock-logistics-barcode, leonidasthe300/stock-logistics-barcode, leonidasthe300/stock-logistics-workflow, levkar/stock-logistics-workflow, leyonh/stock-logistics-workflow, lideritjnma/stock-logistics-barcode, lideritjnma/stock-logistics-workflow, lijielife/stock-logistics-barcode, lijielife/stock-logistics-workflow, lijielife/stock_scanner, lonelyleaves/stock-logistics-barcode, lonelyleaves/stock-logistics-workflow, luence/stock-logistics-workflow, lulzzz/stock-logistics-barcode, lulzzz/stock-logistics-workflow, margibs/stock-logistics-barcode, marionumza/stock-logistics-barcode, marionumza/stock-logistics-workflow, markrobinson85/stock-logistics-workflow, maurochip/stock-logistics-barcode, mediaengagers/stock-logistics-barcode, mehdi-ghezal/stock-logistics-workflow, meigallodixital/stock-logistics-workflow, microcom/stock-logistics-workflow, mikevhe18/stock-logistics-workflow, minhhq09/stock-logistics-barcode, minorisa/stock-logistics-workflow, mjadily/stock-logistics-barcode, mohamedhabibchallouf/stock-logistics-barcode, mpanarin/stock-logistics-workflow, nabiforks/stock-logistics-barcode, nabima/stock-logistics-barcode, nikul-serpentcs/stock-logistics-workflow, ninh2k/stock-logistics-barcode, nisheednair/stock-logistics-barcode, niulinlnc/stock-logistics-barcode, niulinlnc/stock-logistics-workflow, novawish/stock-logistics-workflow, nuobit/stock-logistics-barcode, nylon7/stock-logistics-barcode, nzroof/stock-logistics-workflow, ofahd/stock-logistics-barcode, oihane/stock-logistics-workflow, omardini/stock-logistics-workflow, onurugur/stock-logistics-barcode, open-synergy/stock-logistics-workflow, osfp-Pakistan/stock-logistics-workflow, osiell/stock-logistics-workflow, ovnicraft/stock-logistics-workflow, percevaq/stock-logistics-workflow, peterxue/stock-logistics-barcode, peterxue/stock-logistics-workflow, phatnguyenuit/stock-logistics-barcode, piqoni/stock-logistics-workflow, pmctire/stock-logistics-barcode, presenceverte/stock-logistics-barcode, presenceverte/stock-logistics-workflow, pscloud/stock-logistics-barcode, pscloud/stock-logistics-workflow, qdelcourte/stock-logistics-workflow, quentinDupont/stock-logistics-workflow, raizs/stock-logistics-workflow, redblow/stock-logistics-barcode, redblow/stock-logistics-workflow, rkhalil1990/stock-logistics-barcode, rkhalil1990/stock-logistics-workflow, roniap/stock-logistics-barcode, royalline1/stock-logistics-barcode, rsullivan2704/stock-logistics-workflow, rudisulistyo/stock-logistics-barcode, ruihua1970/stock-logistics-workflow, rven/stock-logistics-barcode, ryanc-me/stock-logistics-workflow, sa3m/stock-logistics-barcode, sadeqamin/stock-logistics-workflow, sagar-developer-92/stock-logistics-workflow, sanube/stock-logistics-barcode, sanube/stock-logistics-workflow, scigghia/stock-logistics-workflow, seaalliancefood/stock-logistics-barcode, sebalix/stock-logistics-barcode, sebalix/stock-logistics-workflow, seffalabdelaziz/stock-logistics-barcode, sendalpegat/stock-logistics-barcode, sendalpegat/stock-logistics-workflow, serCliff/stock-logistics-workflow, sergiocorato/stock-logistics-workflow, sewisoft/stock-logistics-barcode, sewisoft/stock-logistics-workflow, shouyejing/stock-logistics-barcode, simplifysolutions/stock-logistics-barcode, simplifysolutions/stock-logistics-workflow, sondt87/stock-logistics-workflow, spacimek/stock-logistics-workflow, spadae22/stock-logistics-workflow, subteno-it/stock-logistics-barcode, subteno-it/stock-logistics-workflow, subteno-it/stock_scanner, sudhir-serpentcs/stock-logistics-workflow, tafaRU/stock-logistics-workflow, takinobori/oca-stock-logistics-workflow, takobi-online/stock-logistics-barcode, takobi-online/stock-logistics-workflow, talway/stock-logistics-barcode, tegin/stock-logistics-workflow, thinkopensolutions/oca-stock-logistics-warehouse, thinkopensolutions/oca-stock-logistics-workflow, tongJK/stock-logistics-workflow, unitek-solusi/OCA-stock-logistics-barcode, unitek-solusi/OCA-stock-logistics-workflow, ursais/stock-logistics-workflow, valmarnet/stock-logistics-barcode, valmarnet/stock-logistics-workflow, vcloud9ray/stock-logistics-workflow, vdedyukhin/stock-logistics-barcode, vdedyukhin/stock-logistics-workflow, versada/stock-logistics-barcode, versada/stock-logistics-workflow, victoralmau/stock-logistics-workflow, victorgbueno/stock-logistics-workflow, vidtsin/stock-logistics-barcode, vittio/stock-logistics-workflow, wade1990/stock_scanner, wader1990/stock-logistics-barcode, wahello/stock-logistics-workflow, wahhid/stock-logistics-workflow, westlyou/stock-logistics-barcode, x0rzkov/odoo-stock-logistics-barcode, x0rzkov/odoo-stock-logistics-workflow, xtendoo-corporation/stock-logistics-barcode, xwh123807/stock-logistics-barcode, yf956613/stock-logistics-workflow, yucer/stock-logistics-barcode, yustas147/stock-logistics-workflow, zambee/stock-logistics-barcode, zambee/stock-logistics-workflow, zeroincombenze/stock-logistics-barcode, zeroincombenze/stock-logistics-workflow, and zhy0313/stock-logistics-workflow

<a class="reference external image-reference" 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.svg"> </a> <a name="stock-scanner-workflow-engine-for-scanner-hardware"></a> <h2>Stock Scanner : WorkFlow engine for scanner hardware</h2> <p>This module allows managing barcode readers with simple scenarios:</p> <ul class="simple"> <li>You can define a workflow for each object (stock picking, inventory, sale, etc)</li> <li>Works with all scanner hardware model (just SSH client required)</li> </ul> <p>Some demo/tutorial scenarios are available in the &quot;demo&quot; directory of the module. These scenarios, are automatically imported when installing a new database with demo data.</p> <a name="installation"></a> <h3>Installation</h3> <p>The <cite>odoo-sentinel</cite> specific client can be installed from pip:</p> <blockquote> $ pip install odoo-sentinel</blockquote> <p>This application is a separate client, and can be run on any device.</p> <p>For mobile devices, like Windows Mobile or Android smart barcode scanners, we usually install it on a server, accessed through SSH.</p> <p>To test the module, some modules provide scenario.</p> <a name="configuration"></a> <h3>Configuration</h3> <a name="in-odoo"></a> <h4>In Odoo</h4> <a name="declare-hardware"></a> <h5>Declare hardware</h5> <p>You have to declare some hardware scanners in Odoo.</p> <p>Go to &quot;Inventory &gt; Configuration &gt; Scanner Configuration &gt; Scanner Hardware&quot; and create a new record.</p> <p>The &quot;step type code&quot; sent by the &quot;odoo-sentinel&quot; client at start-up is the IP address of the hardware, if connected through SSH.</p> <a name="if-needed-enable-login-logout"></a> <h5>If needed enable Login/Logout</h5> <p>The module comes with 2 predefined scenarii for Login and Logout. The functionality is disabled by default and the user to use in Odoo must be specified in the <cite>.odoorpcrc</cite> file used by odoo-sentinel and can be overriden on the Scanner Hardware definition in Odoo.</p> <p>If the Login/logout functionality is enabled, when a user starts a session with odoo-sentinel, only the Login scenario is displayed on the screen. The scenario will prompt the user for its login and pwd. If the authentication succeeds, each interaction with Odoo will be done using the uid of the connected user. Once connected, a Logout scenario is displayed in the list of available scenarii and the Login scenario no longer appears.</p> <p>The Login/logout functionality enables you to specify on the scenario a list of users and/or a list of groups with access to the scenario.</p> <dl class="docutils"> <dt>To enable the Login/logout functionality:</dt> <dd><ul class="first last simple"> <li>Go to &quot;Settings &gt; Warehouse&quot; and check the checkbox Login/logout scenarii enabled.</li> <li>Create a <em>Technical User</em> 'sentinel' <strong>without roles in Human Resources</strong> and with 'Sentinel: technical users' checked.</li> <li>Use this user to launch your odoo-sentinel session.</li> </ul> </dd> </dl> <p>Be careful, the role <em>Sentinel: technical users</em> is a technical role and should only be used by sentinel.</p> <p>The timeout of sessions is managed by a dedicated cron that resets the inactive sessions. The timeout can be configured on settings. &quot;Settings &gt; Warehouse&quot;</p> <a name="for-the-odoo-sentinel-client"></a> <h4>For the odoo-sentinel client</h4> <p>The odoo-sentinel client uses an OdooRPC profile to connect to Odoo. The default configuration file is <cite>~/.odoorpcrc</cite>, but this can be customized, using the <cite>-c</cite>/<cite>--config</cite> argument. See the <cite>hardware/odoorpcrc.sample</cite> file for an example.</p> <p>If the <cite>-p</cite>/<cite>--profile</cite> argument is not given on the command line, a profile named <cite>sentinel</cite> will be used.</p> <p>The file used to log errors can be defined by using the <cite>-l</cite>/<cite>--log-file</cite> argument, which defaults to <cite>~/sentinel.log</cite>.</p> <p><strong>Note</strong> : If you want to copy the application outside this git repository, you will need to copy the i18n folder too.</p> <a name="autoconfiguration-feature"></a> <h5>Autoconfiguration feature</h5> <p>The <cite>odoo-sentinel</cite> client has an autoconfiguration feature, used to automatically recognize the hardware being connected. During initialization, the <cite>odoo-sentinel</cite> client tries to detect an SSH connection, and sends the terminal's IP address as terminal code. If the IP address is found on the <cite>code</cite> field on a configured hardware in the database, this hardware configuration will automatically be used. If the IP address is not found, the client will ask the user to type (or scan) a code.</p> <p>This can be used only if the Odoo server and the connected hardware are on the same network.</p> <a name="writing-scenario"></a> <h4>Writing scenario</h4> <a name="creation"></a> <h5>Creation</h5> <p>The preferred way to start the creation of a scenario is to create steps and transitions in diagram view.</p> <p>Once your steps are created, you can write python code directly from Odoo, or you can export the scenario to write the python code with your preferred code editor.</p> <dl class="docutils"> <dt>In the python code of each step, some variables are available :</dt> <dd><ul class="first last simple"> <li>cr : Cursor to the database</li> <li>uid : ID of the user executing the step (user used to log in with the sentinel, or user configured on the hardware, if any)</li> <li>pool : Pooler to the database</li> <li>env : Environment used to execute the scenario (new API)</li> <li>model : Pooler on the model configured on the scenario</li> <li>term : Recordset on the current scenario</li> <li>context : Context used on the step</li> <li>m or message : Last message sent by the hardware</li> <li>t or terminal : Browse record on the hardware executing the step</li> <li>tracer : Value of the tracer of the used transition to access this step</li> <li>wkf or workflow : Workflow service</li> <li>scenario : Recordset on the current scenario for the hardware</li> <li>_ : The translation function provided by Odoo (useable like in any other python file)</li> </ul> </dd> </dl> <p>Some of these variables are also available on transition conditions execution.</p> <p>As stated previously, the step must always return:</p> <ul class="simple"> <li>A step type code, in the <cite>act</cite> variable</li> <li>A message to display on the hardware screen, in the <cite>res</cite> variable</li> <li>Optionally, a default value, in the <cite>val</cite> variable</li> </ul> <a name="step-types"></a> <h5>Step types</h5> <p>The step types are mostly managed by the client.</p> <p>The standard step types are :</p> <ul class="simple"> <li>M : Simple message</li> <li>F : Final step, like M, but ends the scenario</li> <li>T : Text input</li> <li>N : Number input (integer)</li> <li>Q : Quantity input (float)</li> <li>L : List</li> <li>E : Error message, like M, but displayed with different colors</li> <li>C : Confirm input</li> <li>A : Automatic step. This type is used to automatically execute the next step</li> </ul> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">The automatic step often needs to define a value in <cite>val</cite>, corresponding to the value the user must send. This step type is generally used as replacement of another type, at the end of the step code, by redefining the <cite>act</cite> variable in some cases, for example when a single value is available for a list step.</p> </div> <a name="import"></a> <h5>Import</h5> <p>Scenarios are automatically imported on a module update, like any other data. You just have to add the path to your <cite>Scenario_Name.scenario</cite> files in the <cite>data</cite> or <cite>demo</cite> sections in the <cite>__manifest__.py</cite> file.</p> <a name="export"></a> <h5>Export</h5> <p>The export script is in the <cite>script</cite> directory of the module</p> <dl class="docutils"> <dt>A scenario is exported as a set of files, containing :</dt> <dd><ul class="first last simple"> <li>Scenario_Name.scenario : Global description of the scenario (name, warehouses, steps, transitions, etc.)</li> <li>A .py file per step : The name of the file is the XML ID of the step</li> </ul> </dd> </dl> <a name="using-a-test-file"></a> <h5>Using a test file</h5> <p>When developing scenarios, you will often have the same steps to run. The odoo-sentinel client allows you to supply a file, which contains the keys pressed during the scenario.</p> <p>You can define the file to use in the <cite>-t</cite>/<cite>--test-file</cite> argument. This file will be read instead of calling the curses methods when the scenario is waiting for a user input (including line feed characters). When the file has been fully read, the client exits.</p> <p>A sample test file can be found in the &quot;Step Types&quot; demo scenario.</p> <p><em>Special keys</em> : For special keys (arrows, delete, etc.), you must write a line containing ':', followed by the curses key code.</p> <dl class="docutils"> <dt>Valid key codes are :</dt> <dd><ul class="first last simple"> <li>KEY_DOWN : Down arrow</li> <li>KEY_UP : Up arrow</li> <li>KEY_LEFT : Left arrow</li> <li>KEY_RIGHT : Right arrow</li> <li>KEY_BACKSPACE : Backspace</li> <li>KEY_DC : Delete</li> </ul> </dd> </dl> <a name="usage"></a> <h3>Usage</h3> <p>On start-up, the client lists available scenarii. When the user selects a scenario, the current scenario and step are stored on the hardware configuration's entry in Odoo.</p> <p>When the client sends a message to the server, the next step is selected depending on the current step and the message sent. Then, the server returns the result of the step, which contains its type code and the text to display on the hardware screen. Unlike the standard Odoo Workflow, each step needs to find a valid transition, because a step needs to be displayed on the hardware screen at all times.</p> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/154/12.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <p>A client for the Datalogic PowerScan scanners was developped for a very early version or this module. The files have been removed, but are still available in the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/527f033e9d31fe822562d4716104f37f6ce1f88c/stock_scanner/hardware/datalogic/PowerScan">git repository history</a>.</p> <a name="bug-tracker"></a> <h3>Bug Tracker</h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/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/stock-logistics-workflow/issues/new?body=module:%20stock_scanner%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a name="credits"></a> <h3>Credits</h3> <a name="images"></a> <h4>Images</h4> <ul class="simple"> <li>Odoo Community Association: <a class="reference external" href="https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg">Icon</a>.</li> </ul> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>Alexandre Fayolle &lt;<a class="reference external" href="mailto:afayolle.ml&#64;free.fr">afayolle.ml&#64;free.fr</a>&gt;</li> <li>Christophe CHAUVET &lt;<a class="reference external" href="mailto:christophe.chauvet&#64;syleam.fr">christophe.chauvet&#64;syleam.fr</a>&gt;</li> <li>Damien Crier &lt;<a class="reference external" href="mailto:damien&#64;crier.me">damien&#64;crier.me</a>&gt;</li> <li>Laetitia Gangloff &lt;<a class="reference external" href="mailto:laetitia.gangloff&#64;acsone.eu">laetitia.gangloff&#64;acsone.eu</a>&gt;</li> <li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li> <li>Olivier Dony &lt;<a class="reference external" href="mailto:odo&#64;openerp.com">odo&#64;openerp.com</a>&gt;</li> <li>Sebastien LANGE &lt;<a class="reference external" href="mailto:sebastien.lange&#64;syleam.fr">sebastien.lange&#64;syleam.fr</a>&gt;</li> <li>Sylvain Garancher &lt;<a class="reference external" href="mailto:sylvain.garancher&#64;syleam.fr">sylvain.garancher&#64;syleam.fr</a>&gt;</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <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>This module is maintained by the OCA.</p> <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>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>