-
-
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
base: 16.0
Are you sure you want to change the base?
Conversation
[ADD] barcode nomenclature for tare [ADD] tare field on pos.order.line model [ADD] Tare button in PoS numpad [IMP] handle correctly different UoM [IMP] add warning at checkout if qty <=0 [IMP] display gross and tare weight for each line Co-authored-by: François Kawala <[email protected]> Co-authored-by: Sylvain LE GAL <[email protected]>
Currently translated at 100.0% (46 of 46 strings) Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/
…antity in the correct place
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/
Currently translated at 100.0% (55 of 55 strings) Translation: pos-12.0/pos-12.0-pos_tare Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_tare/it/
don't focus fields on the scale screen when the tare can be input with a barcode reader to avoid filling the field with the barcode value.
|
@huguesdk I've updated the doc but the image links do not work, I don't manage to figure out why. |
|
@victor-champonnois thanks! it's normal: images link to their location on github in the main branch for the version ( |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
@OCA/pos-maintainers could anyone please review or merge this? |
|
@OCA/pos-maintainers could anyone please review or merge this? |
|
LGTM, but I'd like someone more active in the project @OCA/pos-maintainers to have a second look on this before merging. Thank you so much for your work on this @huguesdk ! |
ivantodorovich
left a comment
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 have experience with this module, but technically it looks good.
I would perhaps encourage you to squash some of the commits into the migration one, as they seem to be a part of it
ferdymercury
left a comment
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.
Thanks a lot for this migration.
Looks good to me for merging. Just indicating some irrelevant typos and clarifications that could be fixed.
pos_tare/README.rst
Outdated
| .. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_config.png | ||
|
|
||
|
|
||
| To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is `0700000{NNDDD}`. Using that pattern, the barcode for a tare of 0.1kg is `0700000001006`. The `pos_tare_barcode_generator` allows you to create tare labels right from the POS. |
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.
| To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is `0700000{NNDDD}`. Using that pattern, the barcode for a tare of 0.1kg is `0700000001006`. The `pos_tare_barcode_generator` allows you to create tare labels right from the POS. | |
| To generate a tare barcode 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 EAN-13 barcode pattern is `0700000{NNDDD}C`, where `NN` are the kilograms, `DDD` are the grams and `C` is a check digit. Using that pattern, the barcode for a tare of 0.123kg is `0700000001236`. The maximum weight that can be represented with this barcode is just below 100 kg. The embedded barcode generator allows you to create and print tare labels right from the POS. |
Is pos_tare_barcode_generator a separate module or subfunction ? If not, maybe reword as suggested.
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’m not aware of this module. i quickly looked in earlier versions but did not find it. another module (pos_self_service_weighing_tare, see #1397) allows to do this (but not from another pos than the one used to sell products).
|
|
||
| .. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_config.png | ||
|
|
||
|
|
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?
pos_tare/README.rst
Outdated
|
|
||
| To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is `0700000{NNDDD}`. Using that pattern, the barcode for a tare of 0.1kg is `0700000001006`. The `pos_tare_barcode_generator` allows you to create tare labels right from the POS. | ||
|
|
||
| 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. |
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.
| 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. | |
| 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. |
pos_tare/readme/USAGE.rst
Outdated
| .. figure:: ../static/description/pos_config.png | ||
|
|
||
|
|
||
| To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is `0700000{NNDDD}`. Using that pattern, the barcode for a tare of 0.1kg is `0700000001006`. The `pos_tare_barcode_generator` allows you to create tare labels right from the POS. |
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.
Same comments/corrections as above would apply, since this paragraph is duplicated.
Maybe this whole file can be replaced with just a link pointing to the proper section in README.rst ?
pos_tare/README.rst
Outdated
| Give the possibility to the user to enter a Tare weight, when weighing | ||
| products in the Point of Sale. | ||
| This will compute automatically net weight and set it to the current | ||
| selected order |
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.
| selected order | |
| selected order. |
| @@ -0,0 +1,3 @@ | |||
| - Sylvain LE GAL (https://www.twitter.com/legalsylvain) | |||
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.
in the README.rst, also GRAP is listed
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.
sylvain le gal works for grap.
pos_tare/readme/DESCRIPTION.rst
Outdated
| Give the possibility to the user to enter a Tare weight, when weighing | ||
| products in the Point of Sale. | ||
| This will compute automatically net weight and set it to the current | ||
| selected order |
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.
| selected order | |
| selected order. |
Or remove with a link to README to avoid duplication?
| <p>To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is <cite>0700000{NNDDD}</cite>. Using that pattern, the barcode for a tare of 0.1kg is <cite>0700000001006</cite>. The <cite>pos_tare_barcode_generator</cite> allows you to create tare labels right from the POS.</p> | ||
| <p>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.</p> |
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.
Same corrections / comments as above.
| <p>Give the possibility to the user to enter a Tare weight, when weighing | ||
| products in the Point of Sale. | ||
| This will compute automatically net weight and set it to the current | ||
| selected order</p> |
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.
| selected order</p> | |
| selected order.</p> |
877ea28 to
aac3826
Compare
|
@ivantodorovich thanks for the review. i’m not sure about squashing the commits, as many features of version 12.0 had been lost in the porting to 14.0, and they had to be re-added after the porting to 16.0. that’s why i think it is useful to keep them separate, especially as they explain better each change. what do you think? |
huguesdk
left a comment
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.
@ferdymercury thanks for the review. i’ve update the readme with your suggestions (and improved it a little bit also). please note that the readme fragments (from the readme directory) are restructuredtext, not markdown, and that README.rst and static/description/index.html are automatically generated from them.
|
|
||
| .. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_config.png | ||
|
|
||
|
|
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?
| @@ -0,0 +1,3 @@ | |||
| - Sylvain LE GAL (https://www.twitter.com/legalsylvain) | |||
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.
sylvain le gal works for grap.
pos_tare/README.rst
Outdated
| .. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_tare/static/description/pos_config.png | ||
|
|
||
|
|
||
| To generate a tare barcode you need to use the default barcode nomenclature. The default barcode pattern is `0700000{NNDDD}`. Using that pattern, the barcode for a tare of 0.1kg is `0700000001006`. The `pos_tare_barcode_generator` allows you to create tare labels right from the POS. |
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’m not aware of this module. i quickly looked in earlier versions but did not find it. another module (pos_self_service_weighing_tare, see #1397) allows to do this (but not from another pos than the one used to sell products).
ferdymercury
left a comment
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.
Thanks a lot for the fixes!
I agree it's better to keep the current commit history (no need to squash)
ferdymercury
left a comment
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.
some minor typos in the translation
| #. module: pos_tare | ||
| #: selection:barcode.rule,type:0 | ||
| msgid "Meal Voucher Payment" | ||
| msgstr "" |
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.
| msgstr "" | |
| msgstr "Pago de cupón de comida" |
| #: code:addons/pos_tare/static/src/js/screens.js:185 | ||
| #, python-format | ||
| msgid "Feature Disabled" | ||
| msgstr "" |
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.
| msgstr "" | |
| msgstr "Característica deshabilitada" |
| #: model:product.product,name:pos_tare.cheese | ||
| #: model:product.template,name:pos_tare.cheese_product_template | ||
| msgid "Cheese by the Slice" | ||
| msgstr "" |
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.
| msgstr "" | |
| msgstr "Queso al corte" |
| #: code:addons/pos_tare/static/src/xml/pos_tare.xml:34 | ||
| #, python-format | ||
| msgid "Gross Weight:" | ||
| msgstr "" |
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.
| msgstr "" | |
| msgstr "Peso bruto:" |
| #: code:addons/pos_tare/static/src/js/screens.js:91 | ||
| #, python-format | ||
| msgid "Incorrect Gross Weight Value" | ||
| msgstr "" |
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.
| msgstr "" | |
| msgstr "Valor de peso bruto incorrecto" |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" |
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.
| "Project-Id-Version: Odoo Server 12.0\n" | |
| "Project-Id-Version: Odoo Server 16.0\n" |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" |
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.
| "Project-Id-Version: Odoo Server 12.0\n" | |
| "Project-Id-Version: Odoo Server 16.0\n" |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" |
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.
| "Project-Id-Version: Odoo Server 12.0\n" | |
| "Project-Id-Version: Odoo Server 16.0\n" |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" |
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.
| "Project-Id-Version: Odoo Server 12.0\n" | |
| "Project-Id-Version: Odoo Server 16.0\n" |
| #: model:ir.model.fields,help:pos_tare.field_pos_config__iface_tare_method | ||
| msgid "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" |
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.
| "* 'barecode' : (scan a barcode to tare the selected order line;\n" | |
| "* 'barcode' : scan a barcode to tare the selected order line;\n" |
|
@ferdymercury the translation files will be updated automatically by the bot after merge. once merged, you will be able to add new translations using weblate (link to version 12 of the translation of this module, as 16 will be created after merge). |
* display an error message when a tare is set on a product that uses a different uom category than the one used for the tare instead of just throwing an exception and making the pos unusable until it is reloaded. * don't compute the weight if no tare is set to avoid uom categories mismatch errors, falling back to odoo's default behavior.
|
i’ve added a new commit to gracefully handle uom categories mismatch errors. |
this is a follow-up on #1224. it contains all of its commits (as it’s the same branch), as well as several commits to restore features present in version 12.0 but that disappeared during the migration to 14.0, with also some fixes and improvements.