-
-
Notifications
You must be signed in to change notification settings - Fork 680
[9.0] [ADD] Self service scale for loose goods and products sold by weight #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82fa67a
Self weighting addon ready for PR.
Fkawala 80d3454
Added demo. Switched to weight barcode.
Fkawala 684a1aa
Fix flake8.
Fkawala 4647bbf
Fix demo data + more robust barcode generation.
Fkawala 652e1f4
Fix currency symbol in barcode labels.
Fkawala 4a6cf7e
Fixes for Vincent's review.
Fkawala 2a11ed0
Better labels using format_currency.
Fkawala 3af474d
Fix rounding problem on tare label + improve CSS.
Fkawala d5715a6
Better documentation.
Fkawala 0b2bd04
Fix image in documentation.
Fkawala 0cdf2e4
Doc fix.
Fkawala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| # -*- coding: utf-8 -*- | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,7 @@ | |
| } | ||
|
|
||
| .pos .pos-tare-label .caption { | ||
| text-overflow: ellipsis; | ||
| display: block; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| =============================== | ||
| Point of Sale - Self weighting | ||
| =============================== | ||
|
|
||
| .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Beta | ||
| .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-3 | ||
| .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github | ||
| :target: https://github.com/OCA/pos/tree/9.0/pos_self_weighting | ||
| :alt: OCA/pos | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/pos-9-0/pos-9-0-pos_self_weighting | ||
| :alt: Translate me on Weblate | ||
| .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
| :target: https://runbot.odoo-community.org/runbot/184/9.0 | ||
| :alt: Try me on Runbot | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| 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. | ||
|
|
||
| The *self service* BYOC scheme has six steps: | ||
| 1. The customer weighs her-his pot and sticks the tare barcode onto the pot. | ||
| 2. The customer puts loose goods into the labeled pot. | ||
| 3. The customer scans the tare barcode. POS saves the tare value. | ||
| 4. The customer weighs the pot with loose goods inside. POS computes the price to pay from gross weight and tare weight. | ||
| 5. The customer gets a price barcode label indicating the price to pay. | ||
| 6. During checkout, the cashier swiftly scans the price barcode label. | ||
|
|
||
|
|
||
| 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. | ||
|
|
||
| This add-on displays only the products that are meant to be weighted with a scale. | ||
|
|
||
| Home screen of the selected POS is: | ||
|
|
||
| .. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighting/static/description/default_screen.png | ||
|
|
||
| To click on "tare a container" shows: | ||
|
|
||
| .. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighting/static/description/tare_screen.png | ||
|
|
||
| To click on "weight a product in a container" shows: | ||
|
|
||
| .. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighting/static/description/tare_scan_screen.png | ||
|
|
||
| To click on "weight a product" shows: | ||
|
|
||
| .. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_self_weighting/static/description/product_screen.png | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| Install this add-on and configure the point of sale where you want to use a self service weighting station. The label printing is done using web print. To streamline the label printing it is advised to use the silent printing mode (firefox) or the kiosk printing (chrome). | ||
|
|
||
| The command line to start a chrome base browser in kiosk mode with silent printing looks like: | ||
|
|
||
| ``chromium-browser --use-system-default-printer --kiosk --kiosk-printing http://localhost:8069/`` | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_. | ||
| 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 | ||
| `feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_self_weighting%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Do not contact contributors directly about support or help with technical issues. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Authors | ||
| ~~~~~~~ | ||
|
|
||
| * Le Nid | ||
|
|
||
| Contributors | ||
| ~~~~~~~~~~~~ | ||
|
|
||
| - Le Nid | ||
| - SPP Meyrin | ||
| - Icons made by Freepik from flaticon.com | ||
|
|
||
| Maintainers | ||
| ~~~~~~~~~~~ | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| 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. | ||
|
|
||
| .. |maintainer-fkawala| image:: https://github.com/fkawala.png?size=40px | ||
| :target: https://github.com/fkawala | ||
| :alt: fkawala | ||
|
|
||
| Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
|
||
| |maintainer-fkawala| | ||
|
|
||
| This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/9.0/pos_self_weighting>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # @author: François Kawala | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
| { | ||
| 'name': "Point of Sale - Self weighting ", | ||
| 'version': '9.0.0.0.1', | ||
| 'category': 'Point of Sale', | ||
| 'summary': """Point of Sale - Self service weighting station for loose\ | ||
| goods.""", | ||
| 'author': "Le Nid, Odoo Community Association (OCA)", | ||
| 'website': "https://github.com/OCA/pos", | ||
| 'license': 'AGPL-3', | ||
| 'maintainers': ['fkawala'], | ||
| 'depends': ['point_of_sale', 'pos_barcode_tare'], | ||
| 'demo': ['demo/pos_self_weighting_demo.xml'], | ||
| 'data': [ | ||
| 'pos_self_weighting.xml', | ||
Fkawala marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 'views/pos_config_view.xml' | ||
| ], | ||
| 'qweb': [ | ||
| 'static/src/xml/pos_self_weighting.xml', | ||
| ], | ||
| 'installable': True, | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo> | ||
| <record id="product_uom_kgm_dbg" model="product.uom"> | ||
| <field name="category_id" ref="product.product_uom_categ_kgm"/> | ||
| <field name="name">Kg</field> | ||
| <field name="factor" eval="1"/> | ||
| <field name="rounding" eval="0.001"/> | ||
| </record> | ||
| <record id="product_price_to_weight_barcode" model="product.product"> | ||
| <field name="name">Apples (with weight barcode)</field> | ||
| <field name="barcode">2112345000008</field> | ||
| <field name="list_price">1.50</field> | ||
| <field name="uom_id" ref="product_uom_kgm_dbg"/> | ||
| <field name="uom_po_id" ref="product_uom_kgm_dbg"/> | ||
| </record> | ||
| </odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import pos_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # -*- coding: utf-8 -*- | ||
| from openerp import models, fields | ||
|
|
||
|
|
||
| class PosConfig(models.Model): | ||
| _inherit = 'pos.config' | ||
| iface_self_weight = fields.Boolean( | ||
| 'Use that POS as self weighting station' | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <odoo> | ||
| <template id="assets_backend" name="pos_barcode_tare" inherit_id="point_of_sale.assets"> | ||
| <xpath expr="." position="inside"> | ||
| <link rel="stylesheet" href="/pos_self_weighting/static/src/css/pos_self_weighting.css"/> | ||
| <script type="text/javascript" src="/pos_self_weighting/static/src/js/pos_self_weighting.js"></script> | ||
| </xpath> | ||
| </template> | ||
| </odoo> | ||
Fkawala marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| - Le Nid | ||
| - SPP Meyrin | ||
| - Icons made by Freepik from flaticon.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| 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. | ||
|
|
||
| The *self service* BYOC scheme has six steps: | ||
| 1. The customer weighs her-his pot and sticks the tare barcode onto the pot. | ||
| 2. The customer puts loose goods into the labeled pot. | ||
| 3. The customer scans the tare barcode. POS saves the tare value. | ||
| 4. The customer weighs the pot with loose goods inside. POS computes the price to pay from gross weight and tare weight. | ||
| 5. The customer gets a price barcode label indicating the price to pay. | ||
| 6. During checkout, the cashier swiftly scans the price barcode label. | ||
|
|
||
|
|
||
| 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. | ||
|
|
||
| This add-on displays only the products that are meant to be weighted with a scale. | ||
|
|
||
| Home screen of the selected POS is: | ||
|
|
||
| .. image:: ../static/description/default_screen.png | ||
|
|
||
| To click on "tare a container" shows: | ||
|
|
||
| .. image:: ../static/description/tare_screen.png | ||
|
|
||
| To click on "weight a product in a container" shows: | ||
|
|
||
| .. image:: ../static/description/tare_scan_screen.png | ||
|
|
||
| To click on "weight a product" shows: | ||
|
|
||
| .. image:: ../static/description/product_screen.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Install this add-on and configure the point of sale where you want to use a self service weighting station. The label printing is done using web print. To streamline the label printing it is advised to use the silent printing mode (firefox) or the kiosk printing (chrome). | ||
|
|
||
| The command line to start a chrome base browser in kiosk mode with silent printing looks like: | ||
|
|
||
| ``chromium-browser --use-system-default-printer --kiosk --kiosk-printing http://localhost:8069/`` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.