Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2c90fe2
[ADD][8.0] pos_tare
legalsylvain Jan 8, 2020
af7360c
[REF] pos_tare: Black python code
legalsylvain Jan 8, 2020
87f83ee
[MIG] pos_tare: Migration to 12.0
legalsylvain Jan 8, 2020
ce0e546
[UPD] Update pos_tare.pot
oca-travis Jul 23, 2020
5fd57ff
[UPD] README.rst
OCA-git-bot Jul 23, 2020
1f3a029
pos_tare 12.0.1.0.1
OCA-git-bot Jul 23, 2020
968ef6c
Added translation using Weblate (Spanish)
danimv5 Jul 27, 2020
6afcefd
Translated using Weblate (Spanish)
danimv5 Jul 27, 2020
5650aa3
[UPD] Update pos_tare.pot
oca-travis Oct 30, 2020
abf330d
Update translation files
oca-transbot Oct 30, 2020
d618a4e
[FIX] pos_tare : raise an error if the gross weight is not correct
legalsylvain Nov 16, 2020
fda0045
[FIX] pos_tare : move the confirm popup regarding null or negative qu…
legalsylvain Nov 20, 2020
c87f751
[UPD] Update pos_tare.pot
oca-travis Dec 15, 2020
2279a48
pos_tare 12.0.1.0.2
OCA-git-bot Dec 15, 2020
385d399
Update translation files
oca-transbot Dec 15, 2020
d8e720f
[UPD] Update pos_tare.pot
oca-travis Dec 15, 2020
a83863e
Update translation files
oca-transbot Dec 15, 2020
5f9dd73
[IMP][12.O] pos_tare : add default tare weight on product.template model
legalsylvain May 24, 2021
1750fa1
[UPD] Update pos_tare.pot
oca-travis Jun 12, 2021
7ab4489
[UPD] README.rst
OCA-git-bot Jun 12, 2021
c04c3d2
pos_tare 12.0.1.0.3
OCA-git-bot Jun 12, 2021
3d9f788
Update translation files
oca-transbot Jun 12, 2021
773e80d
[UPD] Update pos_tare.pot
oca-travis Jun 12, 2021
83df315
Update translation files
oca-transbot Jun 12, 2021
6ca8067
Added translation using Weblate (Italian)
mymage Mar 17, 2023
4fc9063
Translated using Weblate (Italian)
mymage Mar 17, 2023
3e0dd0b
[IMP] pos_tare: black, isort, prettier
baimont Apr 7, 2023
b23e982
[MIG] pos_tare: Migration to 14.0
baimont Apr 7, 2023
5e26c19
[REF] pos_tare: do not rewrite _getAddProductOptions
robinkeunen Jun 19, 2024
078d1b6
[IMP] pos_tare: black, isort, prettier
robinkeunen Jun 20, 2024
0e568bf
[MIG] pos_tare: Migration to 16.0
robinkeunen Jul 18, 2024
78842df
[IMP] improve readme
huguesdk Jan 21, 2025
0331a28
[FIX] re-add lost barcode error handling code
huguesdk Jan 22, 2025
ef014bd
[FIX] fix english in a field help string
huguesdk Jan 22, 2025
981eec1
[FIX] fix loading of tare at order line creation
huguesdk Jan 23, 2025
db1cca2
[FIX] fix numpad layout css
huguesdk Jan 23, 2025
72b507a
[IMP] convert to native javascript modules
huguesdk Jan 23, 2025
68baa08
[FIX] add missing units to receipt lines
huguesdk Jan 24, 2025
427baa0
[FIX] restore numpad button positions
huguesdk Jan 24, 2025
326a9a0
[FIX] re-add lost weight fields value validation
huguesdk Jan 25, 2025
b8b5b37
[FIX] fix field help string
huguesdk Jan 25, 2025
6edbf18
[IMP] remove useless installable property
huguesdk Jan 25, 2025
da25da5
[IMP] improve scale screen input
huguesdk Jan 25, 2025
1ea7df0
[IMP] re-add lost red background on invalid entry
huguesdk Jan 25, 2025
b72a121
[FIX] restore lost behavior of quantity input
huguesdk Jan 25, 2025
aeb3623
[FIX] use default product tare without scale
huguesdk Jan 25, 2025
282f0bc
[FIX] only set up barcode action when needed
huguesdk Jan 25, 2025
9e4786c
[IMP] handle barcode scanning on the scale screen
huguesdk Jan 25, 2025
5a58623
[IMP] improve scale screen
huguesdk Jan 27, 2025
3f642b3
[FIX] correctly use uom on scale screen
huguesdk Feb 28, 2025
3cdcd03
[IMP] update contributors
huguesdk Feb 28, 2025
93d3ef7
[IMP] simplify convert_mass()
huguesdk Mar 7, 2025
8484369
[FIX] fix fr translation
huguesdk Mar 31, 2025
654a98b
[FIX] don't focus fields when using barcode reader
huguesdk Mar 31, 2025
aac3826
[IMP] update and improve documentation
victor-champonnois May 13, 2025
fed3578
[FIX] warn when uom categories don't match
huguesdk Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions pos_tare/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
====================
Point Of Sale - Tare
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:308df37ca0d8288a8593ab10beebb59eb7922a9029c1f976084a2ac5c3d14d12
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/16.0/pos_tare
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_tare
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Allow to enter a tare weight when weighing products in the Point of Sale.
This will compute the net weight automatically and set it on the currently selected order line.

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_tare.png

The net weight is displayed in the order with the tare value below it.

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/order.png

This information is also displayed on the receipt.

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_ticket.png

**Table of contents**

.. contents::
:local:

Usage
=====

Install this module and configure the point of sale.
To enable this addon, go to the point of sale configuration page.
There, enable the electronic scale and barcode reader in the "IoT Box" section.
In the same page, look for the "Tare Input Method" field, and choose a tare method.
There are three tare methods:

- "Manual": allows to enter the tare value when a product is weighed
- "Barcode": allows to scan a barcode containing the tare value
- "Both": allows both of the above methods

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_config.png

To handle tare barcodes you need to use the `default barcode nomenclature <https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/barcode/operations/barcode_nomenclature.html>`__.
The default tare barcode rule is an EAN-13 barcode of the form ``0700000{NNDDD}`` (where ``N`` will encode the kilograms units and ``D`` the decimals).
Using that pattern, the barcode for a tare of 1.234 kg is ``0700000012347`` (the last digit is the EAN-13 check digit).
This barcode rule can be modified if needed, and other ones added.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One curiosity, why did you choose 07 as prefix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don’t know where this prefix comes from. @legalsylvain do you know this?

The ``pos_self_service_weighing_tare`` module allows to weigh containers and create tare barcode labels from a PoS configured as a self-service weighing station.

You can define a default tare on the product form view, if you always use the same type of packaging (or container) for a given product.

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/product_template.png

.. note::
If a product with a different UoM category than the one used for the tare is set to be weighed with a scale, an error message will appear when a tare is set, as the weight cannot be computed.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_tare%0Aversion:%2016.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
~~~~~~~

* GRAP
* Le Nid

Contributors
~~~~~~~~~~~~

- Sylvain LE GAL (https://www.twitter.com/legalsylvain)
- Le Nid
- `Coop IT Easy SC <https://coopiteasy.be>`_

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
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-fkawala| |maintainer-legalsylvain|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_tare>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_tare/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
31 changes: 31 additions & 0 deletions pos_tare/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# @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": "16.0.1.0.0",
"category": "Point of Sale",
"author": "GRAP, Le Nid, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"maintainers": ["fkawala", "legalsylvain"],
"depends": [
"point_of_sale",
],
"data": [
"views/view_pos_config.xml",
"views/view_pos_order.xml",
"views/view_product_template.xml",
"data/barcode_rule.xml",
],
"assets": {
"point_of_sale.assets": [
"pos_tare/static/src/scss/*.scss",
"pos_tare/static/src/js/**/*.js",
"pos_tare/static/src/xml/**/*.xml",
],
},
"demo": [
"demo/product_product.xml",
],
}
14 changes: 14 additions & 0 deletions pos_tare/data/barcode_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" ?>
<odoo noupdate="1">
<record id="barcode_rule_tare" model="barcode.rule">
<field name="name">Tare</field>
<field
name="barcode_nomenclature_id"
ref="barcodes.default_barcode_nomenclature"
/>
<field name="sequence">81</field>
<field name="type">tare</field>
<field name="encoding">ean13</field>
<field name="pattern">0700000{NNDDD}</field>
</record>
</odoo>
17 changes: 17 additions & 0 deletions pos_tare/demo/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2021 - 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>
<record id="cheese" model="product.product">
<field name="name">Cheese by the Slice</field>
<field name="uom_id" ref="uom.product_uom_kgm" />
<field name="uom_po_id" ref="uom.product_uom_kgm" />
<field name="lst_price">18</field>
<field name="available_in_pos" eval="True" />
<field name="to_weight" eval="True" />
<field name="tare_weight">0.006</field>
</record>
</odoo>
Loading