Search 1.9 billion lines of Odoo code on GitHub

stock_reserve_rule

Author: Camptocamp, Odoo Community Association (OCA)
License: AGPL-3
Branch: 9.0
Repository: OCA/product-kitting
Dependencies: product_packaging_type, and stock
Languages: HTML (427, 25.1%), Python (818, 48.2%), XML (286, 16.8%), and reStructuredText (167, 9.8%)
Other repositories: ACCOMODATA-BVBA/stock-logistics-warehouse, AITIC/stock-logistics-warehouse, BT-cserra/stock-logistics-warehouse, Change2improve/stock-logistics-warehouse, ComitorDevTeam/stock-logistics-warehouse, Comunitea/stock-logistics-warehouse, Darknroses/stock-logistics-warehouse, Digital5-Odoo/stock-logistics-warehouse, DinamicheAziendali/stock-logistics-warehouse, ERPLibre/stock-logistics-warehouse, ForgeFlow/stock-logistics-barcode, ForgeFlow/stock-logistics-warehouse, Gabinete-Digital/stock-logistics-warehouse, Ingeos/stock-logistics-warehouse, Jarsa-dev/stock-logistics-warehouse, Jarsa/stock-logistics-warehouse, KDenisNoah/stock-logistics-warehouse, KonaERP/stock-logistics-warehouse, LevelPrime/stock-logistics-warehouse, NeatNerdPrime/stock-logistics-warehouse, OCA/stock-logistics-warehouse, PlanetaTIC/stock-logistics-warehouse, QubiQ/stock-logistics-warehouse, SequarSrl/stock-logistics-warehouse, SerpentConsultingServices/stock-logistics-warehouse, SeuMarco/stock-logistics-warehouse, Studio73/stock-logistics-warehouse, TDu/stock-logistics-warehouse, TRESCLOUD/stock-logistics-warehouse, Tecnativa/stock-logistics-warehouse, Tonow-c2c/stock-logistics-warehouse, Vauxoo/stock-logistics-warehouse, aaltinisik/stock-logistics-warehouse, acsone/stock-logistics-warehouse, adhoc-dev/stock-logistics-warehouse, akretion/stock-logistics-warehouse, ansinaesmejor/stock-logistics-warehouse, asphaltzipper/stock-logistics-warehouse, aurestic/stock-logistics-warehouse, bmya/stock-logistics-warehouse, brain-tec/stock-logistics-warehouse, camptocamp/stock-logistics-warehouse, coopiteasy/stock-logistics-warehouse, digitalsatori/stock-logistics-warehouse, druidoo-dev/stock-logistics-warehouse, eLBati/stock-logistics-warehouse, ecosoft-odoo/stock-logistics-warehouse, enzymz/stock-logistics-warehouse, etobella/stock-logistics-warehouse, flotho/stock-logistics-warehouse, gfcapalbo/stock-logistics-warehouse, grindtildeath/stock-logistics-warehouse, guewen/stock-logistics-warehouse, gurneyalex/stock-logistics-warehouse, hbrunn/stock-logistics-warehouse, hibou-io/oca-stock-logistics-warehouse, jado95/stock-logistics-warehouse, jbaudoux/stock-logistics-warehouse, jimhoefnagels/stock-logistics-warehouse, khaungyemin/stock-logistics-warehouse, kitsotik/stock-logistics-warehouse, kmee/stock-logistics-warehouse, kos94ok-3D/stock-logistics-warehouse, lkicska/stock-logistics-warehouse, mohannadjamalhadi/stock-logistics-warehouse, patrickrwilson/stock-logistics-warehouse, sebalix/stock-logistics-warehouse, sergiocorato/stock-logistics-warehouse, sunshineLhj/stock-logistics-warehouse, takinobori/oca-stock-logistics-warehouse, takobi-online/stock-logistics-warehouse, tegin/stock-logistics-warehouse, unitek-solusi/OCA-stock-logistics-warehouse, ursais/stock-logistics-warehouse, versada/stock-logistics-warehouse, wahello/stock-logistics-warehouse, and xtendoo-corporation/stock-logistics-warehouse

<h1 class="title">Stock Reservation Rules</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/stock-logistics-warehouse/tree/13.0/stock_reserve_rule"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_reserve_rule"><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/153/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module adds rules for advanced reservation / removal strategies.</p> <p>Rules are applied on a location and its sub-locations.</p> <p>A rule can exclude quants or locations based on configurable criteria, and based on the selected quants, apply advanced removal strategies.</p> <p>The rules have a sequence, which will be respected for the reservation. So even without filter or advanced removal strategies, we can give a priority to reserve in a location before another.</p> <p>The advanced removal strategies are applied on top of the default one (fifo, fefo, ...).</p> <p>The included advanced removal strategies are:</p> <ul class="simple"> <li>Default Removal Strategy: apply the default configured one (fifo, fefo, ...)</li> <li>Empty Bins: goods are removed from a bin only if the bin will be empty after the removal (favor largest bins first to minimize the number of operations, then apply the default removal strategy for equal quantities).</li> <li>Full Packaging: tries to remove full packaging (configured on the products) first, by largest to smallest package or based on a pre-selected package (default removal strategy is then applied for equal quantities).</li> </ul> <p>Examples of scenario:</p> <p>rules:</p> <ul class="simple"> <li>location A: no filter, no advanced removal strategy</li> <li>location B: no filter, Empty Bins</li> <li>location C: no filter, no advanced removal strategy</li> </ul> <p>result:</p> <ul class="simple"> <li>take what is available in location A</li> <li>then take in location B if available, only if bin(s) are emptied</li> <li>then take what is available in location C</li> </ul> <p>The module is meant to be extensible, with a core mechanism on which new rules and advanced removal strategies can be added.</p> <div class="admonition important"> <p class="first admonition-title">Important</p> <p class="last">This is an alpha version, the data model and design can change at any time without warning. Only for development or testing purpose, do not use in production. <a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p> </div> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li> <li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id4">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id5">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li> </ul> </li> </ul> </div> <a name="configuration"></a> <h2><a class="toc-backref" href="#id1">Configuration</a></h2> <p>The configuration of the rules is done in &quot;Inventory &gt; Configuration &gt; Stock Reservation Rules&quot;.</p> <p>Creation of a rule:</p> <p>Properties that define where the rule will be applied:</p> <ul class="simple"> <li>Location: Define where the rule will look for goods (a parent of the move's source location).</li> <li>Rule Domain: The rule is used only if the Stock Move matches the domain.</li> </ul> <p>Removal rules for the locations:</p> <ul class="simple"> <li>Quants Domain: this domain includes/excludes quants based on a domain.</li> <li>Advanced Removal Strategy: the strategy that will be used for this location and sub-location when the rule is used.</li> </ul> <p>The sequences have to be sorted in the view list to define the reservation priorities.</p> <a name="usage"></a> <h2><a class="toc-backref" href="#id2">Usage</a></h2> <p>If you are using a database with demo data, you can give a try to the following scenario to understand how it works.</p> <p>The demo data created by the module contains:</p> <p>A product: Funky Socks</p> <p>3 Locations:</p> <ul class="simple"> <li>Stock / Zone A / Bin A1: 200 Funky socks</li> <li>Stock / Zone B / Bin B1: 100 Funky socks</li> <li>Stock / Zone C / Bin C1: 100 Funky socks</li> </ul> <p>3 Reservation Rules, in the following order</p> <ul class="simple"> <li>Zone A must have full quantities</li> <li>Zone B</li> <li>Zone C</li> </ul> <p>2 Delivery Orders:</p> <ul class="simple"> <li>Origin: Outgoing shipment (reservation rules demo 1)</li> <li>Origin: Outgoing shipment (reservation rules demo 2)</li> </ul> <p>Scenario:</p> <ul class="simple"> <li>Activate Storage Locations and Multi-Warehouses</li> <li>You can open Inventory &gt; Configuration &gt; Stock Reservation Rules to see the rules</li> <li>Open Transfer: Outgoing shipment (reservation rules demo 1)</li> <li>Check availability: it has 150 units, as it will not empty Zone A, it will not take products there, it should take 100 in B and 50 in C (following the rules order)</li> <li>Unreserve this transfer (to test the second case)</li> <li>Open Transfer: Outgoing shipment (reservation rules demo 2)</li> <li>Check availability: it has 250 units, it can empty Zone A, it will take 200 in Bin A1 and 50 in Bin B1.</li> <li>If you want to explore further, you can add a custom domain to exclude rules (for instance, a product category will not use Zone B).</li> </ul> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id3">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/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-warehouse/issues/new?body=module:%20stock_reserve_rule%0Aversion:%2013.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="#id4">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id5">Authors</a></h3> <ul class="simple"> <li>Camptocamp</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id6">Contributors</a></h3> <ul class="simple"> <li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id7">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/stock-logistics-warehouse/tree/13.0/stock_reserve_rule">OCA/stock-logistics-warehouse</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>

Dependency Graph