-
127pos_barcode_tare/README.rst
-
1pos_barcode_tare/__init__.py
-
24pos_barcode_tare/__manifest__.py
-
185pos_barcode_tare/i18n/fr_CH.po
-
165pos_barcode_tare/i18n/pos_barcode_tare.pot
-
9pos_barcode_tare/models/pos_config.py
-
8pos_barcode_tare/pos_barcode_tare.xml
-
4pos_barcode_tare/readme/CONTRIBUTORS.rst
-
30pos_barcode_tare/readme/DESCRIPTION.rst
-
1pos_barcode_tare/readme/ROADMAP.rst
-
BINpos_barcode_tare/static/description/icon.png
-
123pos_barcode_tare/static/src/css/pos_barcode_tare.css
-
86pos_barcode_tare/static/src/xml/pos_barcode_tare.xml
-
26pos_barcode_tare/views/pos_config_view.xml
-
125pos_tare/README.rst
-
1pos_tare/__init__.py
-
38pos_tare/__manifest__.py
-
0pos_tare/data/barcode_rule.xml
-
0pos_tare/demo/pos_tare_demo.xml
-
51pos_tare/i18n/fr.po
-
0pos_tare/models/__init__.py
-
0pos_tare/models/barcode_rule.py
-
18pos_tare/models/pos_config.py
-
8pos_tare/pos_tare.xml
-
2pos_tare/readme/CONFIGURE.rst
-
5pos_tare/readme/CONTRIBUTORS.rst
-
34pos_tare/readme/DESCRIPTION.rst
-
3pos_tare/readme/ROADMAP.rst
-
0pos_tare/readme/USAGE.rst
-
0pos_tare/static/description/POS_with_button.png
-
BINpos_tare/static/description/icon.png
-
0pos_tare/static/description/index.html
-
0pos_tare/static/description/label.png
-
0pos_tare/static/description/null_weight.png
-
BINpos_tare/static/description/pos_tare.png
-
0pos_tare/static/description/ready_to_print.png
-
0pos_tare/static/description/zoom_action_widget.png
-
240pos_tare/static/src/js/pos_tare.js
-
97pos_tare/static/src/js/screens.js
-
66pos_tare/static/src/xml/pos_tare.xml
-
17pos_tare/views/assets.xml
-
28pos_tare/views/pos_config_view.xml
@ -1,127 +0,0 @@ |
|||
==================================================== |
|||
Point of Sale - Tare barecode labels for loose goods |
|||
==================================================== |
|||
|
|||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|||
!! 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_barcode_tare |
|||
: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_barcode_tare |
|||
: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 enables POS to read and print tare barcodes. We print a barcode tare label to sell loose goods in a Bring Your Own pot (BYOC) scheme. |
|||
|
|||
The BYOC scheme has five steps: |
|||
1. The cashier weighs the pot and sticks the tare barcode onto the customer's pot. |
|||
2. The customer go and put loose goods into the labeled pot. |
|||
3. The cashier weighs the pot with loose goods inside. POS computes the price including the pot. |
|||
4. The cashier scans the tare barcode. POS get the pot weight from the barcode. POS subtracts the pot weight from the weight of the latest product. POS sets the billable price for the loose goods. |
|||
5. The customer pays. |
|||
|
|||
This add-on adds a news screen to POS to print (web) the tare barcode labels. This add-on enables POS to read a tare barcode. Reading a barcode makes POS adjust the weight of the latest article in the order list. The new weight is equal to the total weight minus the tare weight. The price is updated accordingly to the weight change. |
|||
|
|||
POS home screen is now: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/POS_with_button.png |
|||
|
|||
The label screen is: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/null_weight.png |
|||
|
|||
When we read a weight the impression button is enabled |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/ready_to_print.png |
|||
|
|||
A barcode label looks like: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/label.png |
|||
|
|||
Zoom on the action widget: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/zoom_action_widget.png |
|||
|
|||
**Table of contents** |
|||
|
|||
.. contents:: |
|||
:local: |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
Install this add-on and configure the point of sale where you want to be able to use the tare barecode. 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/`` |
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
- Merge with Sylvain LE GAL tare module that allows user to set tare on the scale screen. |
|||
|
|||
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_barcode_tare%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 |
|||
- Sylvain LE GAL |
|||
- CoopITEasy |
|||
|
|||
|
|||
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_barcode_tare>`_ project on GitHub. |
|||
|
|||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
@ -1 +0,0 @@ |
|||
from . import models |
@ -1,24 +0,0 @@ |
|||
# @author: François Kawala |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
{ |
|||
'name': "Point of Sale - Tare barecode labels for loose goods", |
|||
'version': '12.0.1.0.0', |
|||
'category': 'Point of Sale', |
|||
'summary': """Point of Sale - Print and scan tare \ |
|||
barecodes labels to sell loose goods.""", |
|||
'author': "Le Nid, Odoo Community Association (OCA)", |
|||
'website': "https://github.com/OCA/pos", |
|||
'license': 'AGPL-3', |
|||
'maintainers': ['fkawala'], |
|||
'depends': ['point_of_sale'], |
|||
'demo': ['demo/pos_barcode_tare_demo.xml'], |
|||
'data': [ |
|||
'pos_barcode_tare.xml', |
|||
'views/pos_config_view.xml', |
|||
'data/barcode_rule.xml', |
|||
], |
|||
'qweb': [ |
|||
'static/src/xml/pos_barcode_tare.xml', |
|||
], |
|||
'installable': True, |
|||
} |
@ -1,185 +0,0 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * pos_barcode_tare |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2020-02-14 06:44+0000\n" |
|||
"PO-Revision-Date: 2020-02-14 06:44+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"Language: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:8 |
|||
#, python-format |
|||
msgid "Back" |
|||
msgstr "Retour" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:130 |
|||
#, python-format |
|||
msgid "Failed to read weight from scale." |
|||
msgstr "Echec lors de la lecture du poids depuis la balance" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:product.uom,name:pos_barcode_tare.product_uom_kgm_dbg |
|||
msgid "Kg" |
|||
msgstr "Kg" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.ui.view,arch_db:pos_barcode_tare.view_pos_config_form |
|||
msgid "Loose good options" |
|||
msgstr "Options pour la vente en vrac" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:196 |
|||
#, python-format |
|||
msgid "Maximum tare weight is 99.999kg" |
|||
msgstr "Le poids mesuré est supérieur au poids maximum pour la tare: 99.999kg" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:18 |
|||
#, python-format |
|||
msgid "Print" |
|||
msgstr "Imprimer l'étiquette" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:11 |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:41 |
|||
#, python-format |
|||
msgid "Print a tare label" |
|||
msgstr "Imprimer une étiquette de tare" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model.fields,help:pos_barcode_tare.field_pos_config_iface_tare_label |
|||
msgid "Print tare labels with this POS" |
|||
msgstr "Utiliser ce POS pour imprimer les étiquettes de tare" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:15 |
|||
#, python-format |
|||
msgid "Set the pot on the scale and check the weight above" |
|||
msgstr "" |
|||
"Placez le récipient à tarer sur la balance puis vérifiez le poids ci-dessus" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model.fields,field_description:pos_barcode_tare.field_pos_config_iface_tare_label |
|||
msgid "Show tare label button" |
|||
msgstr "Utiliser ce POS pour imprimer les étiquettes de tare" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: code:addons/pos_barcode_tare/models/barcode_rule.py:13 |
|||
#, python-format |
|||
msgid "Tare" |
|||
msgstr "Tare" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:164 |
|||
#, python-format |
|||
msgid "" |
|||
"The scale sent a measure in %s unit. This unit of measure (UOM) in not found " |
|||
"in the point of sale. You may need to create a new UOM named %s. The UOM " |
|||
"name is case sensitive." |
|||
msgstr "" |
|||
"La balance à envoyé une mesure en %s. Cette unité de mesure (UOM) n'existe " |
|||
"pas. Vous devez probablement créer une UOM nommée %s. Le nom de l'UOM est " |
|||
"sensible à la casse." |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:288 |
|||
#, python-format |
|||
msgid "" |
|||
"The tare (%s) is already set for the product \"%s\". We can not re-apply a " |
|||
"tare to this product." |
|||
msgstr "" |
|||
"La tare (%s) est déjà mesurée pour le produit \"%s\". Nous ne pouvons plus " |
|||
"appliquer de tare à ce produit." |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:319 |
|||
#, python-format |
|||
msgid "" |
|||
"The tare weight is %s %s, it's greater or equal to the product weight %s. We " |
|||
"can not apply this tare." |
|||
msgstr "" |
|||
"Le poids de la tare est de %s %s, c'est plus que le poids du produit %s. " |
|||
"Nous ne pouvons pas appliquer cette tare." |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74 |
|||
#, python-format |
|||
msgid "We can not apply this tare barcode." |
|||
msgstr "Impossible d'appliquer cette étiquette de tare." |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:33 |
|||
#, python-format |
|||
msgid "We can not cast a weight in %s into %s." |
|||
msgstr "Nous ne pouvons pas convertir un poids en %s en %s." |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:69 |
|||
#, python-format |
|||
msgid "With a" |
|||
msgstr "Avec un(e)" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:61 |
|||
#, python-format |
|||
msgid "at" |
|||
msgstr "à" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model,name:pos_barcode_tare.model_barcode_rule |
|||
msgid "barcode.rule" |
|||
msgstr "barcode.rule" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:71 |
|||
#, python-format |
|||
msgid "discount" |
|||
msgstr "remise" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:32 |
|||
#, python-format |
|||
msgid "kg" |
|||
msgstr "kg" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model,name:pos_barcode_tare.model_pos_config |
|||
msgid "pos.config" |
|||
msgstr "pos.config" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:32 |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:78 |
|||
#, python-format |
|||
msgid "tare =" |
|||
msgstr "tare =" |
|||
|
|||
#~ msgid "Weight" |
|||
#~ msgstr "Poids" |
@ -1,165 +0,0 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * pos_barcode_tare |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:8 |
|||
#, python-format |
|||
msgid "Back" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:130 |
|||
#, python-format |
|||
msgid "Failed to read weight from scale." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:product.uom,name:pos_barcode_tare.product_uom_kgm_dbg |
|||
msgid "Kg" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.ui.view,arch_db:pos_barcode_tare.view_pos_config_form |
|||
msgid "Loose good options" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:196 |
|||
#, python-format |
|||
msgid "Maximum tare weight is 99.999kg" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:18 |
|||
#, python-format |
|||
msgid "Print" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:11 |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:41 |
|||
#, python-format |
|||
msgid "Print a tare label" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model.fields,help:pos_barcode_tare.field_pos_config_iface_tare_label |
|||
msgid "Print tare labels with this POS" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:15 |
|||
#, python-format |
|||
msgid "Set the pot on the scale and check the weight above" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model.fields,field_description:pos_barcode_tare.field_pos_config_iface_tare_label |
|||
msgid "Show tare label button" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: code:addons/pos_barcode_tare/models/barcode_rule.py:13 |
|||
#, python-format |
|||
msgid "Tare" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:164 |
|||
#, python-format |
|||
msgid "The scale sent a measure in %s unit. This unit of measure (UOM) in not found in the point of sale. You may need to create a new UOM named %s. The UOM name is case sensitive." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:288 |
|||
#, python-format |
|||
msgid "The tare (%s) is already set for the product \"%s\". We can not re-apply a tare to this product." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:319 |
|||
#, python-format |
|||
msgid "The tare weight is %s %s, it's greater or equal to the product weight %s. We can not apply this tare." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74 |
|||
#, python-format |
|||
msgid "We can not apply this tare barcode." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:33 |
|||
#, python-format |
|||
msgid "We can not cast a weight in %s into %s." |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:69 |
|||
#, python-format |
|||
msgid "With a" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:61 |
|||
#, python-format |
|||
msgid "at" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model,name:pos_barcode_tare.model_barcode_rule |
|||
msgid "barcode.rule" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:71 |
|||
#, python-format |
|||
msgid "discount" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:32 |
|||
#, python-format |
|||
msgid "kg" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#: model:ir.model,name:pos_barcode_tare.model_pos_config |
|||
msgid "pos.config" |
|||
msgstr "" |
|||
|
|||
#. module: pos_barcode_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:32 |
|||
#: code:addons/pos_barcode_tare/static/src/xml/pos_barcode_tare.xml:78 |
|||
#, python-format |
|||
msgid "tare =" |
|||
msgstr "" |
|||
|
@ -1,9 +0,0 @@ |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class PosConfig(models.Model): |
|||
_inherit = 'pos.config' |
|||
iface_tare_label = fields.Boolean( |
|||
'Show tare label button', |
|||
help="Print tare labels with this POS" |
|||
) |
@ -1,8 +0,0 @@ |
|||
<odoo> |
|||
<template id="assets_backend" name="pos_barcode_tare" inherit_id="point_of_sale.assets"> |
|||
<xpath expr="." position="inside"> |
|||
<link rel="stylesheet" href="/pos_barcode_tare/static/src/css/pos_barcode_tare.css"/> |
|||
<script type="text/javascript" src="/pos_barcode_tare/static/src/js/pos_barcode_tare.js"></script> |
|||
</xpath> |
|||
</template> |
|||
</odoo> |
@ -1,4 +0,0 @@ |
|||
- Le Nid |
|||
- Sylvain LE GAL |
|||
- CoopITEasy |
|||
|
@ -1,30 +0,0 @@ |
|||
This add-on enables POS to read and print tare barcodes. We print a barcode tare label to sell loose goods in a Bring Your Own pot (BYOC) scheme. |
|||
|
|||
The BYOC scheme has five steps: |
|||
1. The cashier weighs the pot and sticks the tare barcode onto the customer's pot. |
|||
2. The customer go and put loose goods into the labeled pot. |
|||
3. The cashier weighs the pot with loose goods inside. POS computes the price including the pot. |
|||
4. The cashier scans the tare barcode. POS get the pot weight from the barcode. POS subtracts the pot weight from the weight of the latest product. POS sets the billable price for the loose goods. |
|||
5. The customer pays. |
|||
|
|||
This add-on adds a news screen to POS to print (web) the tare barcode labels. This add-on enables POS to read a tare barcode. Reading a barcode makes POS adjust the weight of the latest article in the order list. The new weight is equal to the total weight minus the tare weight. The price is updated accordingly to the weight change. |
|||
|
|||
POS home screen is now: |
|||
|
|||
.. image:: ../static/description/POS_with_button.png |
|||
|
|||
The label screen is: |
|||
|
|||
.. image:: ../static/description/null_weight.png |
|||
|
|||
When we read a weight the impression button is enabled |
|||
|
|||
.. image:: ../static/description/ready_to_print.png |
|||
|
|||
A barcode label looks like: |
|||
|
|||
.. image:: ../static/description/label.png |
|||
|
|||
Zoom on the action widget: |
|||
|
|||
.. image:: ../static/description/zoom_action_widget.png |
@ -1 +0,0 @@ |
|||
- Merge with Sylvain LE GAL tare module that allows user to set tare on the scale screen. |
Before Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -1,123 +0,0 @@ |
|||
.pos .print-label.disabled { |
|||
background: #e2e2e2; |
|||
border: solid 1px #BEBEBE; |
|||
opacity: 0.5; |
|||
cursor: default; |
|||
color: inherit; |
|||
} |
|||
|
|||
.pos .tare-screen .centered-content { |
|||
text-align:center; |
|||
} |
|||
|
|||
@media screen { |
|||
.pos .tare-screen .pos-tare-label-container { |
|||
width: 300px; |
|||
background-color: white; |
|||
margin: 20px; |
|||
padding: 15px; |
|||
font-size: 21px; |
|||
padding-bottom:30px; |
|||
font-family: "Inconsolata"; |
|||
border: solid 1px rgb(220,220,220); |
|||
border-radius: 3px; |
|||
overflow: hidden; |
|||
text-align: center; |
|||
display: inline-block; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
.pos .tare-screen .pos-tare-label-container img { |
|||
width: 50mm; |
|||
height: 45mm; |
|||
} |
|||
} |
|||
|
|||
.pos .tare-screen .pos-tare-label-container .caption { |
|||
display: block; |
|||
text-overflow: ellipsis; |
|||
flex-basis: 100vw; |
|||
} |
|||
|
|||
.pos .tare-screen .pos-directions-for-user { |
|||
font-size: 25px; |
|||
margin: 8px; |
|||
text-align: center; |
|||
line-height: 2; |
|||
} |
|||
|
|||
.pos .tare-screen .pos-directions-for-user span { |
|||
width:100px; |
|||
height: 50px; |
|||
background-color: rgb(49,174,218); |
|||
color: white !important; |
|||
font-weight: bold; |
|||
border: solid 1px black; |
|||
border-radius: 90% 30%; |
|||
display: flex; |
|||
align-items: center; |
|||
overflow: hidden; |
|||
vertical-align:middle; |
|||
justify-content: center; |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
} |
|||
|
|||
.pos .tare-screen .centered-content .print-label { |
|||
text-align: center; |
|||
font-size: 32px; |
|||
background: rgb(110,200,155); |
|||
color: white; |
|||
border-radius: 3px; |
|||
padding: 16px; |
|||
margin: 16px; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
@media print { |
|||
body { |
|||
position: relative !important; |
|||
} |
|||
|
|||
.pos .tare-screen header, |
|||
.pos .tare-screen .top-content, |
|||
.pos .tare-screen .print-label, |
|||
.pos .tare-screen .pos-directions-for-user { |
|||
display: none !important; |
|||
} |
|||
|
|||
.pos .tare-screen .screen-content { |
|||
max-width: unset !important; |
|||
} |
|||
|
|||
.pos .tare-screen .centered-content { |
|||
position: static; |
|||
text-align: center; |
|||
border: none; |
|||
width: 100vw; |
|||
height: 100vh; |
|||
margin: 0mm; |
|||
page-break-inside: avoid; |
|||
overflow: hidden; |
|||
padding: 0; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-wrap: wrap; |
|||
left: unset !important; |
|||
right: unset !important; |
|||
} |
|||
|
|||
.pos .tare-screen .centered-content .pos-tare-label-container img { |
|||
width: 90vw; |
|||
height: 70vh; |
|||
} |
|||
|
|||
.pos .tare-screen .centered-content .pos-tare-label-container .caption { |
|||
text-overflow: ellipsis; |
|||
font-size: 5vh; |
|||
flex-basis: 100%; |
|||
} |
|||
} |
@ -1,86 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<templates id="template" xml:space="preserve"> |
|||
<t t-name="TareScreenWidget"> |
|||
<div class='tare-screen screen'> |
|||
<div class='screen-content'> |
|||
<div class='top-content'> |
|||
<span class='button back'> |
|||
<i class='fa fa-angle-double-left'></i> |
|||
Back |
|||
</span> |
|||
<h1>Print a tare label</h1> |
|||
</div> |
|||
<div class="centered-content"> |
|||
<div class="pos-tare-label-container"></div> |
|||
<div class="pos-directions-for-user"> |
|||
Set the pot on the scale and check the weight above |
|||
</div> |
|||
<div class='print-label'> |
|||
Print |
|||
<i class='fa fa-angle-double-right'></i> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="PosTareLabel"> |
|||
<div class="pos-center-align"> |
|||
<div class="pos-tare-paper"> |
|||
<div class="pos-tare-label"> |
|||
<img t-att-src="'/report/barcode/EAN13/' + widget.get_barcode_data()" /> |
|||
<span class="caption">tare = <t t-esc="widget.get_weight()" />kg</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="TareScreenButton"> |
|||
<t t-if="widget.pos.config.iface_tare_label"> |
|||
<span class="control-button"> |
|||
<i class="fa fa-print"></i> |
|||
Print a tare label |
|||
</span> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-name="Orderline"> |
|||
<li t-attf-class="orderline #{ line.selected ? 'selected' : '' }"> |
|||
<span class="product-name"> |
|||
<t t-esc="line.get_product().display_name"/> |
|||
</span> |
|||
<span class="price"> |
|||
<t t-esc="widget.format_currency(line.get_display_price())"/> |
|||
</span> |
|||
<ul class="info-list"> |
|||
<t t-if="line.get_quantity_str() !== '1' || line.selected "> |
|||
<li class="info"> |
|||
<em> |
|||
<t t-esc="line.get_quantity_str()" /> |
|||
</em> |
|||
<t t-esc="line.get_unit().name" /> |
|||
at |
|||
<t t-esc="widget.format_currency(line.get_unit_display_price(),'Product Price')" /> |
|||
/ |
|||
<t t-esc="line.get_unit().name" /> |
|||
</li> |
|||
</t> |
|||
<t t-if="line.get_discount_str() !== '0'"> |
|||
<li class="info"> |
|||
With a |
|||
<em> |
|||
<t t-esc="line.get_discount_str()" />% |
|||
</em> |
|||
discount |
|||
</li> |
|||
</t> |
|||
<t t-if="line.get_tare_str() !== '0'"> |
|||
<li class="info"> |
|||
tare = <t t-esc="line.get_tare_str_with_unit()" /> |
|||
</li> |
|||
</t> |
|||
</ul> |
|||
</li> |
|||
</t> |
|||
|
|||
</templates> |
@ -1,26 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
|
|||
<odoo> |
|||
<record model="ir.ui.view" id="view_pos_config_form"> |
|||
<field name="name">view.pos.config.form</field> |
|||
<field name="model">pos.config</field> |
|||
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" /> |
|||
<field name="priority" eval="30"/> |
|||
<field name="arch" type="xml"> |
|||
<div id="posbox_reference" position="inside"> |
|||
<div class="col-12 col-lg-6 o_setting_box"> |
|||
<div class="o_setting_left_pane"> |
|||
<field name="iface_tare_label"/> |
|||
</div> |
|||
<div class="o_setting_right_pane"> |
|||
<label for="iface_tare_label"/> |
|||
<div class="text-muted"> |
|||
Show tare barcode printer button on top of the num pad. |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -1,8 +1,127 @@ |
|||
==================== |
|||
Point Of Sale - Tare |
|||
==================== |
|||
==================================================== |
|||
Point of Sale - Tare barecode labels for loose goods |
|||
==================================================== |
|||
|
|||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|||
!! 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_barcode_tare |
|||
: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_barcode_tare |
|||
: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 enables POS to read and print tare barcodes. We print a barcode tare label to sell loose goods in a Bring Your Own pot (BYOC) scheme. |
|||
|
|||
The BYOC scheme has five steps: |
|||
1. The cashier weighs the pot and sticks the tare barcode onto the customer's pot. |
|||
2. The customer go and put loose goods into the labeled pot. |
|||
3. The cashier weighs the pot with loose goods inside. POS computes the price including the pot. |
|||
4. The cashier scans the tare barcode. POS get the pot weight from the barcode. POS subtracts the pot weight from the weight of the latest product. POS sets the billable price for the loose goods. |
|||
5. The customer pays. |
|||
|
|||
This add-on adds a news screen to POS to print (web) the tare barcode labels. This add-on enables POS to read a tare barcode. Reading a barcode makes POS adjust the weight of the latest article in the order list. The new weight is equal to the total weight minus the tare weight. The price is updated accordingly to the weight change. |
|||
|
|||
POS home screen is now: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/POS_with_button.png |
|||
|
|||
The label screen is: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/null_weight.png |
|||
|
|||
When we read a weight the impression button is enabled |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/ready_to_print.png |
|||
|
|||
A barcode label looks like: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/label.png |
|||
|
|||
Zoom on the action widget: |
|||
|
|||
.. image:: https://raw.githubusercontent.com/OCA/pos/9.0/pos_barcode_tare/static/description/zoom_action_widget.png |
|||
|
|||
**Table of contents** |
|||
|
|||
.. contents:: |
|||
:local: |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
Install this add-on and configure the point of sale where you want to be able to use the tare barecode. 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/`` |
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
- Merge with Sylvain LE GAL tare module that allows user to set tare on the scale screen. |
|||
|
|||
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_barcode_tare%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 |
|||
- Sylvain LE GAL |
|||
- CoopITEasy |
|||
|
|||
|
|||
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_barcode_tare>`_ project on GitHub. |
|||
|
|||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
@ -0,0 +1 @@ |
|||
from . import models |
@ -1,20 +1,24 @@ |
|||
# Copyright (C) 2015-Today GRAP (http://www.grap.coop) |
|||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) |
|||
# @author: François Kawala |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
"name": "Point Of Sale - Tare", |
|||
"summary": "Manage Tare in Point Of Sale module", |
|||
"version": "12.0.1.0.0", |
|||
"category": "Point Of Sale", |
|||
"author": "GRAP, " |
|||
"Odoo Community Association (OCA)", |
|||
"maintainers": ["legalsylvain"], |
|||
"website": "https://www.github.com/OCA/pos", |
|||
"license": "AGPL-3", |
|||
"depends": ["point_of_sale"], |
|||
"data": ["views/assets.xml"], |
|||
"qweb": ["static/src/xml/pos_tare.xml"], |
|||
"installable": True, |
|||
"images": ["static/description/pos_tare.png"], |
|||
'name': "Point of Sale - Tare barecode labels for loose goods", |
|||
'version': '12.0.1.0.0', |
|||
'category': 'Point of Sale', |
|||
'summary': """Point of Sale - Print and scan tare \ |
|||
barecodes labels to sell loose goods.""", |
|||
'author': "Le Nid, Odoo Community Association (OCA)", |
|||
'website': "https://github.com/OCA/pos", |
|||
'license': 'AGPL-3', |
|||
'maintainers': ['fkawala'], |
|||
'depends': ['point_of_sale'], |
|||
'demo': ['demo/pos_tare_demo.xml'], |
|||
'data': [ |
|||
'pos_tare.xml', |
|||
'views/pos_config_view.xml', |
|||
'data/barcode_rule.xml', |
|||
], |
|||
'qweb': [ |
|||
'static/src/xml/pos_tare.xml', |
|||
], |
|||
'installable': True, |
|||
} |
@ -1,51 +0,0 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * pos_tare |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2020-01-08 15:03+0000\n" |
|||
"PO-Revision-Date: 2020-01-08 15:03+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: pos_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_tare/static/src/xml/pos_tare.xml:11 |
|||
#, python-format |
|||
msgid "Gross Weight" |
|||
msgstr "Poids Brut" |
|||
|
|||
#. module: pos_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_tare/static/src/js/screens.js:49 |
|||
#, python-format |
|||
msgid "Incorrect Tare Value" |
|||
msgstr "Valeur de tare incorrecte" |
|||
|
|||
#. module: pos_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_tare/static/src/xml/pos_tare.xml:19 |
|||
#, python-format |
|||
msgid "Kg" |
|||
msgstr "Kg" |
|||
|
|||
#. module: pos_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_tare/static/src/js/screens.js:50 |
|||
#, python-format |
|||
msgid "Please set a numeric value in the tare field, or let empty." |
|||
msgstr "Veuillez saisir une valeur numérique dans le champ 'tare', ou le laisser vide." |
|||
|
|||
#. module: pos_tare |
|||
#. openerp-web |
|||
#: code:addons/pos_tare/static/src/xml/pos_tare.xml:15 |
|||
#, python-format |
|||
msgid "Tare" |
|||
msgstr "Tare" |
@ -0,0 +1,18 @@ |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class PosConfig(models.Model): |
|||
_inherit = 'pos.config' |
|||
|
|||
iface_tare_method = fields.Selection([ |
|||
('Manual', 'Input the tare manually'), |
|||
('Barcode', 'Scan a barcode to set the tare'), |
|||
('Both', 'Manual input and barcode'), |
|||
], |
|||
string='Tare input method', |
|||
default='Both', |
|||
help="Select tare method:\n" |
|||
"* 'Manual (the scale screen has an extra tare input field)';\n" |
|||
"* 'Barecode (scan a barcode to tare the selected order line)';\n" |
|||
"* 'Both manual input and barcode methods are enabled';", |
|||
) |
@ -0,0 +1,8 @@ |
|||
<odoo> |
|||
<template id="assets_backend" name="pos_tare" inherit_id="point_of_sale.assets"> |
|||
<xpath expr="." position="inside"> |
|||
<link rel="stylesheet" href="/pos_tare/static/src/css/pos_tare.css"/> |
|||
<script type="text/javascript" src="/pos_tare/static/src/js/pos_tare.js"></script> |
|||
</xpath> |
|||
</template> |
|||
</odoo> |
@ -1,2 +0,0 @@ |
|||
To enable this feature, you should enable "IoT Box" on your Point of Sale, |
|||
and check the box "Electronic Scale" |
@ -1 +1,4 @@ |
|||
* Sylvain LE GAL (https://www.twitter.com/legalsylvain) |
|||
- Le Nid |
|||
- Sylvain LE GAL |
|||
- CoopITEasy |
|||
|
@ -1,6 +1,30 @@ |
|||
Give the possibility to the user to enter a Tare weight, when weighting |
|||
products in the Point of Sale. |
|||
This will compute automatically net weight and set it to the current |
|||
selected order |
|||
This add-on enables POS to read and print tare barcodes. We print a barcode tare label to sell loose goods in a Bring Your Own pot (BYOC) scheme. |
|||
|
|||
.. figure:: ../static/description/pos_tare.png |
|||
The BYOC scheme has five steps: |
|||
1. The cashier weighs the pot and sticks the tare barcode onto the customer's pot. |
|||
2. The customer go and put loose goods into the labeled pot. |
|||
3. The cashier weighs the pot with loose goods inside. POS computes the price including the pot. |
|||
4. The cashier scans the tare barcode. POS get the pot weight from the barcode. POS subtracts the pot weight from the weight of the latest product. POS sets the billable price for the loose goods. |
|||
5. The customer pays. |
|||
|
|||
This add-on adds a news screen to POS to print (web) the tare barcode labels. This add-on enables POS to read a tare barcode. Reading a barcode makes POS adjust the weight of the latest article in the order list. The new weight is equal to the total weight minus the tare weight. The price is updated accordingly to the weight change. |
|||
|
|||
POS home screen is now: |
|||
|
|||
.. image:: ../static/description/POS_with_button.png |
|||
|
|||
The label screen is: |
|||
|
|||
.. image:: ../static/description/null_weight.png |
|||
|
|||
When we read a weight the impression button is enabled |
|||
|
|||
.. image:: ../static/description/ready_to_print.png |
|||
|
|||
A barcode label looks like: |
|||
|
|||
.. image:: ../static/description/label.png |
|||
|
|||
Zoom on the action widget: |
|||
|
|||
.. image:: ../static/description/zoom_action_widget.png |
@ -1,2 +1 @@ |
|||
* Display the gross weight and the tare on each order line, on the screen |
|||
and on the receipt. |
|||
- Merge with Sylvain LE GAL tare module that allows user to set tare on the scale screen. |
Before Width: 960 | Height: 540 | Size: 198 KiB After Width: 960 | Height: 540 | Size: 198 KiB |
Before Width: 64 | Height: 64 | Size: 3.3 KiB After Width: 128 | Height: 128 | Size: 9.2 KiB |
Before Width: 576 | Height: 393 | Size: 7.4 KiB After Width: 576 | Height: 393 | Size: 7.4 KiB |
Before Width: 960 | Height: 540 | Size: 20 KiB After Width: 960 | Height: 540 | Size: 20 KiB |
Before Width: 501 | Height: 480 | Size: 30 KiB |
Before Width: 960 | Height: 540 | Size: 21 KiB After Width: 960 | Height: 540 | Size: 21 KiB |
Before Width: 437 | Height: 292 | Size: 15 KiB After Width: 437 | Height: 292 | Size: 15 KiB |
@ -1,97 +0,0 @@ |
|||
/* |
|||
Copyright (C) 2015-Today GRAP (http://www.grap.coop)
|
|||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
|
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|||
*/ |
|||
|
|||
|
|||
odoo.define('pos_tare.screens', function (require) { |
|||
"use strict"; |
|||
|
|||
var screens = require('point_of_sale.screens'); |
|||
var utils = require('web.utils'); |
|||
var round_pr = utils.round_precision; |
|||
|
|||
|
|||
screens.ScaleScreenWidget.include({ |
|||
|
|||
// /////////////////////////////
|
|||
// Overload Section
|
|||
// /////////////////////////////
|
|||
|
|||
// Overload show function
|
|||
// add an handler on the
|
|||
show: function(){ |
|||
this._super(); |
|||
this.tare = 0.0; |
|||
var self = this; |
|||
this.$('#input_weight_tare').keyup(function(event){ |
|||
self.onchange_tare(event); |
|||
}); |
|||
this.$('#input_weight_tare').focus() |
|||
}, |
|||
|
|||
// Overload set_weight function
|
|||
// We assume that the argument is now the gross weight
|
|||
// we compute the net weight, depending on the tare and the gross weight
|
|||
// then we call super, with the net weight
|
|||
set_weight: function(gross_weight){ |
|||
this.gross_weight = gross_weight; |
|||
var net_weight = gross_weight - (this.tare || 0); |
|||
this.$('#container_weight_gross').text(this.get_product_gross_weight_string()); |
|||
this._super(net_weight); |
|||
}, |
|||
|
|||
order_product: function(){ |
|||
// TODO Set a warning, if the value is incorrect;
|
|||
if (this.tare === undefined) { |
|||
this.gui.show_popup('error',{ |
|||
'title': _t('Incorrect Tare Value'), |
|||
'body': _t('Please set a numeric value in the tare field, or let empty.'), |
|||
}); |
|||
} |
|||
else { |
|||
this._super(); |
|||
} |
|||
}, |
|||
|
|||
// /////////////////////////////
|
|||
// Custom Section
|
|||
// /////////////////////////////
|
|||
get_product_gross_weight_string: function(){ |
|||
var product = this.get_product(); |
|||
var defaultstr = (this.gross_weight || 0).toFixed(3) + ' Kg'; |
|||
if(!product || !this.pos){ |
|||
return defaultstr; |
|||
} |
|||
var unit_id = product.uom_id; |
|||
if(!unit_id){ |
|||
return defaultstr; |
|||
} |
|||
var unit = this.pos.units_by_id[unit_id[0]]; |
|||
var weight = round_pr(this.gross_weight || 0, unit.rounding); |
|||
var weightstr = weight.toFixed(Math.ceil(Math.log(1.0/unit.rounding) / Math.log(10) )); |
|||
weightstr += ' ' + unit.name; |
|||
return weightstr; |
|||
}, |
|||
|
|||
onchange_tare: function(event){ |
|||
this.tare = this.check_sanitize_value('#input_weight_tare');; |
|||
this.set_weight(this.gross_weight); |
|||
}, |
|||
|
|||
check_sanitize_value: function (input_name){ |
|||
var res = this.$(input_name)[0].value.replace(',', '.').trim(); |
|||
if (isNaN(res)){ |
|||
this.$(input_name).css("background-color", "#F66"); |
|||
return undefined; |
|||
} |
|||
else{ |
|||
this.$(input_name).css("background-color", "#FFF"); |
|||
return parseFloat(res, 10); |
|||
} |
|||
}, |
|||
|
|||
}); |
|||
|
|||
}); |
@ -1,24 +1,60 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
Copyright (C) 2015-Today GRAP (http://www.grap.coop) |
|||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
--> |
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
|
|||
<t t-extend="ScaleScreenWidget"> |
|||
<t t-jquery=".js-weight" t-operation="before"> |
|||
<div class="weight-label"> |
|||
Gross Weight |
|||
</div> |
|||
<div class="weight-value weight-value-fixed" id="container_weight_gross"/> |
|||
<div class="weight-label"> |
|||
Tare |
|||
</div> |
|||
<div class="weight-value weight-value-alterable"> |
|||
<input type="text" class="input-weight" id="input_weight_tare" placeholder="0.000"/> Kg |
|||
</div> |
|||
<t t-if="widget.pos.config.iface_tare_method != 'Barcode'"> |
|||
<div class="weight-label"> |
|||
Gross Weight |
|||
</div> |
|||
<div class="weight-value weight-value-fixed" id="container_weight_gross"/> |
|||
<div class="weight-label"> |
|||
Tare |
|||
</div> |
|||
<div class="weight-value weight-value-alterable"> |
|||
<input type="text" class="input-weight" id="input_weight_tare" placeholder="0.000"/> Kg |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
<t t-name="Orderline"> |
|||
<li t-attf-class="orderline #{ line.selected ? 'selected' : '' }"> |
|||
<span class="product-name"> |
|||
<t t-esc="line.get_product().display_name"/> |
|||
</span> |
|||
<span class="price"> |
|||
<t t-esc="widget.format_currency(line.get_display_price())"/> |
|||
</span> |
|||
<ul class="info-list"> |
|||
<t t-if="line.get_quantity_str() !== '1' || line.selected "> |
|||
<li class="info"> |
|||
<em> |
|||
<t t-esc="line.get_quantity_str()" /> |
|||
</em> |
|||
<t t-esc="line.get_unit().name" /> |
|||
at |
|||
<t t-esc="widget.format_currency(line.get_unit_display_price(),'Product Price')" /> |
|||
/ |
|||
<t t-esc="line.get_unit().name" /> |
|||
</li> |
|||
</t> |
|||
<t t-if="line.get_discount_str() !== '0'"> |
|||
<li class="info"> |
|||
With a |
|||
<em> |
|||
<t t-esc="line.get_discount_str()" />% |
|||
</em> |
|||
discount |
|||
</li> |
|||
</t> |
|||
<t t-if="line.get_tare_str() !== '0'"> |
|||
<li class="info"> |
|||
tare = <t t-esc="line.get_tare_str_with_unit()" /> |
|||
</li> |
|||
</t> |
|||
</ul> |
|||
</li> |
|||
</t> |
|||
|
|||
</templates> |
@ -1,17 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
Copyright (C) 2015-Today GRAP (http://www.grap.coop) |
|||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
--> |
|||
|
|||
<odoo> |
|||
|
|||
<template id="assets" inherit_id="point_of_sale.assets"> |
|||
<xpath expr="." position="inside"> |
|||
<script type="text/javascript" src="/pos_tare/static/src/js/screens.js"/> |
|||
<link rel="stylesheet" href="/pos_tare/static/src/css/pos_tare.css"/> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</odoo> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
|
|||
<odoo> |
|||
<record model="ir.ui.view" id="view_pos_config_form"> |
|||
<field name="name">view.pos.config.form</field> |
|||
<field name="model">pos.config</field> |
|||
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" /> |
|||
<field name="priority" eval="30"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//h2[@name='order']/following-sibling::*[position()=1]" position="inside"> |
|||
<div class="col-xs-12 col-lg-6 o_setting_box" id="iface_tare_method"> |
|||
<div class="o_setting_right_pane"> |
|||
<label for="iface_tare_method" string="Tare method"/> |
|||
<div class="text-muted"> |
|||
Configure how to tare products to weight with a scale. |
|||
</div> |
|||
<div class="content-group"> |
|||
<div class="mt16"> |
|||
<field name="iface_tare_method" class="o_light_label"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |