From ae0b3d93481baff67d3cac9857f4e073911d9840 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Wed, 29 Dec 2021 08:33:42 +0000 Subject: [PATCH] [IMP] barcodes_gs1_nomenclature, uom: add more uom gs1 rules Adding GS1 rules for UoMs in Odoo. Also adding 'yard' UoM since it was not already part of standard UoMs but does have a GS1 rule. Unfortunately not all standard Odoo UoMs have a GS1 rule so we add what we can and will probably have to figure out how to handle these unsupported UoMs when scanning GS1 barcodes. Note that 'lbs' rule is needed not only to read in UoM quantity, but also to read SSCC (i.e. package w/extra info) barcodes when their package contents' info is included in the barcode. Small update to GS1 rules sequences as well to make it easier to add more rules in the future without having to worry about overlapping seq numbers. Part of task: 2494740 Part-of: odoo/odoo#82389 --- .../data/barcodes_gs1_rules.xml | 134 +++++++++++++++--- addons/uom/data/uom_data.xml | 6 + 2 files changed, 121 insertions(+), 19 deletions(-) diff --git a/addons/barcodes_gs1_nomenclature/data/barcodes_gs1_rules.xml b/addons/barcodes_gs1_nomenclature/data/barcodes_gs1_rules.xml index 89ff8826788..4142d3d4ed8 100644 --- a/addons/barcodes_gs1_nomenclature/data/barcodes_gs1_rules.xml +++ b/addons/barcodes_gs1_nomenclature/data/barcodes_gs1_rules.xml @@ -30,7 +30,7 @@ GTIN of contained trade items - 101 + 102 gs1-128 (02)(\d{14}) product @@ -40,7 +40,7 @@ Ship to / Deliver to Global Location Number (GLN) - 102 + 110 gs1-128 (410)(\d{13}) location_dest @@ -50,7 +50,7 @@ Ship for / Deliver for - Forward to Global Location Number (GLN) - 103 + 113 gs1-128 (413)(\d{13}) location_dest @@ -60,7 +60,7 @@ Identification of a physical location - Global Location Number (GLN) - 104 + 114 gs1-128 (414)(\d{13}) location @@ -71,7 +71,7 @@ Batch or lot number - 105 + 125 gs1-128 (10)([!"%-/0-9:-?A-Z_a-z]{0,20}) lot @@ -81,7 +81,7 @@ Serial number - 106 + 126 gs1-128 (21)([!"%-/0-9:-?A-Z_a-z]{0,20}) lot @@ -92,7 +92,7 @@ Packaging date (YYMMDD) - 107 + 137 gs1-128 (13)(\d{6}) packaging_date @@ -102,7 +102,7 @@ Best before date (YYMMDD) - 108 + 138 gs1-128 (15)(\d{6}) use_date @@ -112,7 +112,7 @@ Expiration date (YYMMDD) - 109 + 139 gs1-128 (17)(\d{6}) expiration_date @@ -123,7 +123,7 @@ Variable count of items (variable measure trade item) - 110 + 300 gs1-128 (30)(\d{0,8}) @@ -135,7 +135,7 @@ Count of trade items or trade item pieces contained in a logistic unit - 111 + 305 gs1-128 (37)(\d{0,8}) @@ -147,7 +147,7 @@ Net weight, kilograms (variable measure trade item) - 112 + 310 gs1-128 (310[0-5])(\d{6}) @@ -159,7 +159,7 @@ Length or first dimension, metres (variable measure trade item) - 113 + 311 gs1-128 (311[0-5])(\d{6}) @@ -168,10 +168,22 @@ True + + Area, square meters (variable measure trade item) + + 314 + gs1-128 + (314[0-5])(\d{6}) + + quantity + measure + True + + Net volume, litres (variable measure trade item) - 114 + 315 gs1-128 (315[0-5])(\d{6}) @@ -183,7 +195,7 @@ Net volume, cubic metres (variable measure trade item) - 115 + 316 gs1-128 (316[0-5])(\d{6}) @@ -192,10 +204,22 @@ True + + Net weight, pounds (variable measure trade item) + + 320 + gs1-128 + (320[0-5])(\d{6}) + + quantity + measure + True + + Length or first dimension, inches (variable measure trade item) - 116 + 321 gs1-128 (321[0-5])(\d{6}) @@ -204,10 +228,46 @@ True + + Length or first dimension, feet (variable measure trade item) + + 322 + gs1-128 + (322[0-5])(\d{6}) + + quantity + measure + True + + + + Length or first dimension, yards (variable measure trade item) + + 323 + gs1-128 + (322[0-5])(\d{6}) + + quantity + measure + True + + + + Area, square feet (variable measure trade item) + + 351 + gs1-128 + (351[0-5])(\d{6}) + + quantity + measure + True + + Net weight (or volume), ounces (variable measure trade item) - 117 + 357 gs1-128 (357[0-5])(\d{6}) @@ -216,10 +276,46 @@ True + + Net volume, quarts (variable measure trade item) + + 360 + gs1-128 + (360[0-5])(\d{6}) + + quantity + measure + True + + + + Net volume, gallons U.S. (variable measure trade item) + + 361 + gs1-128 + (361[0-5])(\d{6}) + + quantity + measure + True + + + + Net volume, cubic inches (variable measure trade item) + + 364 + gs1-128 + (364[0-5])(\d{6}) + + quantity + measure + True + + Net volume, cubic feet (variable measure trade item) - 118 + 365 gs1-128 (365[0-5])(\d{6}) @@ -232,7 +328,7 @@ Package type - 200 + 500 gs1-128 (91)([!"%-/0-9:-?A-Z_a-z]{0,90}) package_type diff --git a/addons/uom/data/uom_data.xml b/addons/uom/data/uom_data.xml index 5a7d806b0d1..ae6068e83d9 100644 --- a/addons/uom/data/uom_data.xml +++ b/addons/uom/data/uom_data.xml @@ -149,6 +149,12 @@ 3.28084 smaller + + yd + + 1.09361 + smaller + mi