Search 1.9 billion lines of Odoo code on GitHub

stock_packaging_calculator

Author: Camptocamp, Odoo Community Association (OCA)
License: LGPL-3
Branch: 13.0-add-weblate-status-dro
Repository: acsone/stock-logistics-warehouse
Dependencies: base_sparse_field, and product
Languages: HTML (380, 42.6%), Python (422, 47.4%), and reStructuredText (89, 10.0%)
Other branches: 10.0, 10.0-backport-stock_packaging_calculator, 13.0, 13.0-bai-fix-stock_request_direction-incompatibility-with-click-odoo-update, 13.0-fix-cubiscan-default-dro, 13.0-fix-picking_type_restriction-dro, 13.0-fix-stock-request-backorder-ape, 13.0-fix-stock-request-sudo-ape, 13.0-fix-stock_available-mrp-dro, 13.0-mig_packaging_uom_tbi, 13.0-mig_purchase_packaging_tbi, 13.0-slg_master, 13.0-stocl_request_add_report-ape, 13.0-wpu_master, 14-stock_available_base_exclude_location-xbo, 14-stock_quant_view_reservation, 14.0, 14.0-abi_master, 14.0-add-stock_lot_country_of_origin-dro, 14.0-fix-mto_mts_rule-dro, 14.0-fix-stock_available-mrp-dro, 14.0-imp-stock_available_unreserved-dro, 14.0-imp-stock_request_purchase-dro, 14.0-mig-stock_picking_type_user_restr-dro, 14.0-mig-stock_request_analytic-dro, 14.0-stock_available-cpi, 14.0-stock_available_mrp-sbj, 14.0-stock_available_unreserved-sbj, 14.0-upd-template-dro, 14.0-update_template-dro, 15.0-mig-scrap_reason_code, 15.0-mig-stock_available_immediately, 15.0-mig-stock_free_quantity, 16.0-mig-stock_packaging_calculator, and bai_13.0-fix-stock_request_picking_type
Other repositories: ACCOMODATA-BVBA/stock-logistics-warehouse, AITIC/stock-logistics-warehouse, BT-cserra/stock-logistics-warehouse, Change2improve/stock-logistics-warehouse, Darknroses/stock-logistics-warehouse, Digital5-Odoo/stock-logistics-warehouse, DinamicheAziendali/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, QubiQ/stock-logistics-warehouse, SequarSrl/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, 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, hibou-io/oca-stock-logistics-warehouse, jado95/stock-logistics-warehouse, jbaudoux/stock-logistics-warehouse, khaungyemin/stock-logistics-warehouse, kitsotik/stock-logistics-warehouse, kmee/stock-logistics-warehouse, kos94ok-3D/stock-logistics-warehouse, mohannadjamalhadi/stock-logistics-warehouse, patrickrwilson/stock-logistics-warehouse, sebalix/stock-logistics-warehouse, sodexis/stock-logistics-warehouse, sunshineLhj/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 packaging calculator</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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_packaging_calculator"><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_packaging_calculator"><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>Basic module providing an helper method to calculate the quantity of product by packaging.</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="#usage" id="id1">Usage</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</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="usage"></a> <h2><a class="toc-backref" href="#id1">Usage</a></h2> <p>Imagine you have the following packagings:</p> <ul class="simple"> <li>Pallet: 1000 Units</li> <li>Big box: 500 Units</li> <li>Box: 50 Units</li> </ul> <p>and you have to pick from your warehouse 2860 Units.</p> <p>Then you can do:</p> <blockquote> <pre class="code"> <code class="code">&gt;&gt;&gt; product.product_qty_by_packaging(2860) [ {&quot;id&quot;: 1, &quot;qty&quot;: 2, &quot;name&quot;: &quot;Pallet&quot;}, {&quot;id&quot;: 2, &quot;qty&quot;: 1, &quot;name&quot;: &quot;Big box&quot;}, {&quot;id&quot;: 3, &quot;qty&quot;: 7, &quot;name&quot;: &quot;Box&quot;}, {&quot;id&quot;: 100, &quot;qty&quot;: 10, &quot;name&quot;: &quot;Units&quot;}, ]</code> </pre> </blockquote> <p>With this you can show a proper message to warehouse operators to quickly pick the quantity they need.</p> <p>Optionally you can get contained packaging by passing <cite>with_contained</cite> flag:</p> <blockquote> <pre class="code"> <code class="code">&gt;&gt;&gt; product.product_qty_by_packaging(2860, with_contained=True) [ {&quot;id&quot;: 1, &quot;qty&quot;: 2, &quot;name&quot;: &quot;Pallet&quot;, &quot;contained&quot;: [{&quot;id&quot;: 2, &quot;qty&quot;: 2, &quot;name&quot;: &quot;Big box&quot;}]}, {&quot;id&quot;: 2, &quot;qty&quot;: 1, &quot;name&quot;: &quot;Big box&quot;, &quot;contained&quot;: [{&quot;id&quot;: 3, &quot;qty&quot;: 10, &quot;name&quot;: &quot;Box&quot;}]}, {&quot;id&quot;: 3, &quot;qty&quot;: 7, &quot;name&quot;: &quot;Box&quot;, &quot;contained&quot;: [{&quot;id&quot;: 100, &quot;qty&quot;: 50, &quot;name&quot;: &quot;Units&quot;}]}, {&quot;id&quot;: 100, &quot;qty&quot;: 10, &quot;name&quot;: &quot;Units&quot;, &quot;contained&quot;: []},}, ]</code> </pre> </blockquote> <a name="known-issues-roadmap"></a> <h2><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h2> <p>TODO</p> <ol class="arabic simple"> <li>Fractional quantities (eg: 0.5 Kg) are lost when counting units</li> <li>Maybe rely on <cite>packaging_uom</cite></li> </ol> <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_packaging_calculator%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>Simone Orsi &lt;<a class="reference external" href="mailto:simahawk&#64;gmail.com">simahawk&#64;gmail.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_packaging_calculator">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>