From e564fc4236babcc1aeb57d85894fe0098112fa22 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Tue, 7 Dec 2021 10:16:22 +0000 Subject: [PATCH] [IMP] product_expiry, stock: print GS1 datamatrices for Lot/SNs When printing Lot/SNs barcodes, it's sometimes desired that we print a GS1 compliant datamatrix with the following info (when applicable): Product barcode, Lot/SN barcode, Best By Date, Expiration Date For flexibility, a setting has been added for when the GS1 datamatrix should print instead of 1D barcode. Note that datamatrix will automatically exclude invalid product barcodes (i.e. non-EAN compliant) and datamatrix size can vary based on amount of data in datamatrix (so size has been set to accomodate expected largest gs1 compliant datamatrix possible). If it appears that datamatrix cannot be created, then default to standard 1D barcode. Note that zpl printer has built in datamatrix creation command, so we can always assume they will print correctly. Part of Task: 2494740 Part-of: odoo/odoo#82389 --- .../report/report_lot_barcode.xml | 78 +++++++++++-------- addons/stock/models/res_config_settings.py | 2 + addons/stock/report/product_templates.xml | 18 ++++- addons/stock/report/report_lot_barcode.xml | 14 +++- addons/stock/security/stock_security.xml | 5 ++ .../stock/views/res_config_settings_views.xml | 7 ++ 6 files changed, 87 insertions(+), 37 deletions(-) diff --git a/addons/product_expiry/report/report_lot_barcode.xml b/addons/product_expiry/report/report_lot_barcode.xml index 5c5ed707395..995ba5b4dcb 100644 --- a/addons/product_expiry/report/report_lot_barcode.xml +++ b/addons/product_expiry/report/report_lot_barcode.xml @@ -11,46 +11,60 @@ + + + + + + +