Search 1.9 billion lines of Odoo code on GitHub

pos_self_weighing

Author: Le Nid, Odoo Community Association (OCA)
License: AGPL-3
Branch: 9.0-self-weight-pr
Repository: Fkawala/pos
Dependencies: point_of_sale, and pos_barcode_tare
Languages: CSS (198, 8.4%), HTML (475, 20.1%), JavaScript (405, 17.2%), Python (31, 1.3%), SVG (886, 37.6%), XML (174, 7.4%), and reStructuredText (189, 8.0%)

<h1 class="title">Point of Sale - Self weighing</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/pos/tree/9.0/pos_self_weighing"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pos-9-0/pos-9-0-pos_self_weighing"><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/184/9.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This add-on allows you to run a grocery in a Bring Your Own Container (BYOC) schema. With this add-on your customers will be able to buy loose goods using their own reusable container. This add-on also enables customers to weight their vegetables and fruits before they checkout. To weight fruit and vegetable before checkout will speed up the checkout and make your customer happier.</p> <dl class="docutils"> <dt>The <em>self service</em> BYOC scheme has six steps:</dt> <dd><ol class="first last arabic simple"> <li>The customer weighs her-his pot and sticks the tare barcode onto the pot.</li> <li>The customer puts loose goods into the labeled pot.</li> <li>The customer scans the tare barcode. POS saves the tare value.</li> <li>The customer weighs the pot with loose goods inside. POS computes the price to pay from gross weight and tare weight.</li> <li>The customer gets a price barcode label indicating the price to pay.</li> <li>During checkout, the cashier swiftly scans the price barcode label.</li> </ol> </dd> </dl> <p>This add-on requires you to have a barcode label printer and an electronic scale. Your customers are expected to use this add-on in a self-service way. This add-on adds multiple news screens that are displayed only on the selected POS.</p> <p>This add-on displays only the products that are meant to be weighted with a scale.</p> <p>Home screen of the selected POS is:</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/default_screen.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/default_screen.png" /> <p>To click on &quot;tare a container&quot; shows:</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/tare_screen.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/tare_screen.png" /> <p>To click on &quot;weight a product in a container&quot; shows:</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/tare_scan_screen.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/tare_scan_screen.png" /> <p>To click on &quot;weight a product&quot; shows:</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/product_screen.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/product_screen.png" /> <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><ul> <li><a class="reference internal" href="#introduction" id="id2">Introduction</a></li> <li><a class="reference internal" href="#setup-the-self-service-pos" id="id3">Setup the self service POS</a></li> <li><a class="reference internal" href="#setup-a-barcode-for-each-product-to-weight-with-a-scale" id="id4">Setup a barcode for each product &quot;to weight with a scale&quot;</a></li> <li><a class="reference internal" href="#ssl-certificate-generation" id="id5">SSL certificate generation</a></li> <li><a class="reference internal" href="#firefox" id="id6">Firefox</a></li> <li><a class="reference internal" href="#chrome" id="id7">Chrome</a></li> </ul> </li> <li><a class="reference internal" href="#usage" id="id8">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id9">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id10">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id11">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id12">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id13">Maintainers</a></li> </ul> </li> </ul> </div> <a name="configuration"></a> <h2><a class="toc-backref" href="#id1">Configuration</a></h2> <a name="introduction"></a> <h3><a class="toc-backref" href="#id2">Introduction</a></h3> <p>Install this add-on and configure the point of sale where you want to use a self service weighing station. The label printing is done using web print. This add-on requires to be connected to Odoo POS from a computer that'll be accessible by your customers/members. In order to limit the risk of unfortunate/malicious actions on this POS you should:</p> <ul class="simple"> <li><strong>Use a dedicated odoo account with the least possible rights</strong></li> <li>Configure the web browser to be in kiosk mode (only browsing without navigation bar)</li> </ul> <p>Those measures aren't sufficient <em>per se</em>, but should lower the risk significantly.</p> <a name="setup-the-self-service-pos"></a> <h3><a class="toc-backref" href="#id3">Setup the self service POS</a></h3> <ol class="arabic simple"> <li>Create a new POS</li> <li><dl class="first docutils"> <dt>Setup hardware proxy</dt> <dd><ul class="first last"> <li>Make sure you have a valid SSL certificate issued for POSBOX host (see below).</li> <li>Enable electronic scale</li> <li>Enable barcode reader</li> </ul> </dd> </dl> </li> <li><dl class="first docutils"> <dt>Enable self service weighing</dt> <dd><ul class="first last"> <li>Use the checkbox as shown on screen shot below.</li> <li>If your label printer is able to distribute several labels in a row you can select the <cite>Enable weighing station to print multiple labels at once</cite>. With this option your customers will be able to weigh several products and print all the labels at once. This is assumed to be more efficient.</li> </ul> </dd> </dl> </li> </ol> <p>See the screenshot below, you new POS should page should like this.</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/configuration_details.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/configuration_details.png" /> <a name="setup-a-barcode-for-each-product-to-weight-with-a-scale"></a> <h3><a class="toc-backref" href="#id4">Setup a barcode for each product &quot;to weight with a scale&quot;</a></h3> <p>In the default odoo barcode nomenclature, a barcode with prefix 21 is a &quot;weight&quot; barcode. The default way to process a weight barcode in odoo is to match the base part of the barcode (<em>ie</em>. the two digits prefix and the following five digits). For instance, if you setup barcode <strong>21 12345 00000 8</strong> for your carrots, any barcode with pattern <strong>21 12345 ***** *</strong> will be a match for carrots. This add-on uses weight barcode to encode labels. Therefore, with the previous barcode, <strong>21 12345 01000 7</strong> is be the label for 1kg of carrots. Be sure to have a barcode setup for each article you want to weight with a scale. See screenshot below.</p> <img alt="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/barcode_config.png" src="https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighing/static/description/barcode_config.png" /> <a name="ssl-certificate-generation"></a> <h3><a class="toc-backref" href="#id5">SSL certificate generation</a></h3> <p>Nowadays for any internet facing service the most convenient, secure, and fast way to get SSL certificates is [letsencrypt](<a class="reference external" href="https://letsencrypt.org/">https://letsencrypt.org/</a>). However, it is likely (and expected) that your POSBox and the computer used to display to self weighing POS belong to same network. In such a situation to use a self issued SSL certificate is a valid option. To use a self issued SSL certificate is low maintenance as you can set an arbitrarily far expiration date. As your HTTPS communications are expected to happen locally the security risk of using a self issued SSL certificate is fairly low.</p> <dl class="docutils"> <dt>See bash scripts in the GIST below to:</dt> <dd><ul class="first last simple"> <li>create a certification authority</li> <li>self issue a SSL certificate with this certification authority</li> <li>setup a nginx reverse proxy serving the posbox with the self issued SSL certificate</li> <li>Install the certification authority into the web browser of the computer displaying the self weighing POS belong so that the self issued SSL certificate is considered valid by chrome and firefox.</li> </ul> </dd> </dl> <p><a class="reference external" href="https://gist.github.com/Fkawala/0d46376d3abb7369d34afefaa1ac98fa">https://gist.github.com/Fkawala/0d46376d3abb7369d34afefaa1ac98fa</a></p> <a name="firefox"></a> <h3><a class="toc-backref" href="#id6">Firefox</a></h3> <p>See below how to setup firefox in silent printing mode is described below [source](<a class="reference external" href="http://manual.koha-community.org/3.2/en/firefoxreceipt.html">http://manual.koha-community.org/3.2/en/firefoxreceipt.html</a>)</p> <ol class="arabic simple"> <li>Open File &gt; Page Setup<ul> <li>Make all the headers and footers blank</li> <li>Set the margins to 0 (zero)</li> </ul> </li> <li>In the address bar of Firefox, type <a class="reference external" href="about:config">about:config</a><ul> <li>Search for print.always_print_silent and double click it</li> <li>Change it from false to true</li> <li><dl class="first docutils"> <dt>If print.always_print_silent does not come up:</dt> <dd><ul class="first last"> <li>Right click on a blank area of the preference window</li> <li>Select new &gt; Boolean</li> <li>Enter &quot;print.always_print_silent&quot; as the name (without quotes)</li> <li>Click OK</li> <li>Select true for the value</li> </ul> </dd> </dl> </li> </ul> </li> </ol> <p>You may also want to check what is listed for print.print_printer. You may have to choose Generic/Text Only (or whatever your receipt printer might be named)</p> <a name="chrome"></a> <h3><a class="toc-backref" href="#id7">Chrome</a></h3> <p>Chrome base browsers have a kiosk mode. In kiosk mode the navigation bar is disabled and user action are limited to web browsing. To start a chrome base browser in kiosk mode with silent printing use the command below.</p> <p><code>chromium-browser --use-system-default-printer --kiosk --kiosk-printing http://localhost:8069/</code></p> <a name="usage"></a> <h2><a class="toc-backref" href="#id8">Usage</a></h2> <ol class="arabic simple"> <li>Setup the add-on as explained in the <strong>configuration</strong> section</li> <li>Start the POS</li> <li>Let your happy customers/members use the POS to print price labels for fruits, vegetables and loose goods, let them enjoy a swift checkout process</li> </ol> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id9">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/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/pos/issues/new?body=module:%20pos_self_weighing%0Aversion:%209.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="#id10">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id11">Authors</a></h3> <ul class="simple"> <li>Le Nid</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id12">Contributors</a></h3> <ul class="simple"> <li>Le Nid</li> <li>SPP Meyrin</li> <li>CoopItEasy</li> <li>Icons made by Freepik from flaticon.com</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id13">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>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p> <p><a class="reference external" href="https://github.com/fkawala"><img alt="fkawala" src="https://github.com/fkawala.png?size=40px" /></a></p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/9.0/pos_self_weighing">OCA/pos</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>