-
-
Notifications
You must be signed in to change notification settings - Fork 670
[16.0][MIG] pos_tare: migration to 16.0 #1323
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
Open
huguesdk
wants to merge
56
commits into
OCA:16.0
Choose a base branch
from
coopiteasy:16.0-mig-pos_tare
base: 16.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 af7360c
[REF] pos_tare: Black python code
legalsylvain 87f83ee
[MIG] pos_tare: Migration to 12.0
legalsylvain ce0e546
[UPD] Update pos_tare.pot
oca-travis 5fd57ff
[UPD] README.rst
OCA-git-bot 1f3a029
pos_tare 12.0.1.0.1
OCA-git-bot 968ef6c
Added translation using Weblate (Spanish)
danimv5 6afcefd
Translated using Weblate (Spanish)
danimv5 5650aa3
[UPD] Update pos_tare.pot
oca-travis abf330d
Update translation files
oca-transbot d618a4e
[FIX] pos_tare : raise an error if the gross weight is not correct
legalsylvain fda0045
[FIX] pos_tare : move the confirm popup regarding null or negative qu…
legalsylvain c87f751
[UPD] Update pos_tare.pot
oca-travis 2279a48
pos_tare 12.0.1.0.2
OCA-git-bot 385d399
Update translation files
oca-transbot d8e720f
[UPD] Update pos_tare.pot
oca-travis a83863e
Update translation files
oca-transbot 5f9dd73
[IMP][12.O] pos_tare : add default tare weight on product.template model
legalsylvain 1750fa1
[UPD] Update pos_tare.pot
oca-travis 7ab4489
[UPD] README.rst
OCA-git-bot c04c3d2
pos_tare 12.0.1.0.3
OCA-git-bot 3d9f788
Update translation files
oca-transbot 773e80d
[UPD] Update pos_tare.pot
oca-travis 83df315
Update translation files
oca-transbot 6ca8067
Added translation using Weblate (Italian)
mymage 4fc9063
Translated using Weblate (Italian)
mymage 3e0dd0b
[IMP] pos_tare: black, isort, prettier
baimont b23e982
[MIG] pos_tare: Migration to 14.0
baimont 5e26c19
[REF] pos_tare: do not rewrite _getAddProductOptions
robinkeunen 078d1b6
[IMP] pos_tare: black, isort, prettier
robinkeunen 0e568bf
[MIG] pos_tare: Migration to 16.0
robinkeunen 78842df
[IMP] improve readme
huguesdk 0331a28
[FIX] re-add lost barcode error handling code
huguesdk ef014bd
[FIX] fix english in a field help string
huguesdk 981eec1
[FIX] fix loading of tare at order line creation
huguesdk db1cca2
[FIX] fix numpad layout css
huguesdk 72b507a
[IMP] convert to native javascript modules
huguesdk 68baa08
[FIX] add missing units to receipt lines
huguesdk 427baa0
[FIX] restore numpad button positions
huguesdk 326a9a0
[FIX] re-add lost weight fields value validation
huguesdk b8b5b37
[FIX] fix field help string
huguesdk 6edbf18
[IMP] remove useless installable property
huguesdk da25da5
[IMP] improve scale screen input
huguesdk 1ea7df0
[IMP] re-add lost red background on invalid entry
huguesdk b72a121
[FIX] restore lost behavior of quantity input
huguesdk aeb3623
[FIX] use default product tare without scale
huguesdk 282f0bc
[FIX] only set up barcode action when needed
huguesdk 9e4786c
[IMP] handle barcode scanning on the scale screen
huguesdk 5a58623
[IMP] improve scale screen
huguesdk 3f642b3
[FIX] correctly use uom on scale screen
huguesdk 3cdcd03
[IMP] update contributors
huguesdk 93d3ef7
[IMP] simplify convert_mass()
huguesdk 8484369
[FIX] fix fr translation
huguesdk 654a98b
[FIX] don't focus fields when using barcode reader
huguesdk aac3826
[IMP] update and improve documentation
victor-champonnois fed3578
[FIX] warn when uom categories don't match
huguesdk 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 |
|---|---|---|
| @@ -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. | ||
|
|
||
| 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. | ||
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,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", | ||
| ], | ||
| } |
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,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> |
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,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> |
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?