Renilkumar Kajavadra 360af3dc38 [FIX] barcodes_gs1_nomenclature: barcode scan for GS1 date rule
When user adds rule in the 'Default GS1 Nomenclature' that contains
'Unit product' in Type and 'Date' in GS1 Content Type.

Steps to reproduce the issue:
- Go to Inventory > Configuration > Settings > Barcode
  > Select 'Default GS1 Nomenclature' in Barcode Nomenclature
- Go to Inventory > Configuration > Barcode Nomenclatures
  > Open Default GS1 Nomenclature > Add a line > Select 'Unit Product' in Type
  > Select 'Date' in GS1 Content Type > Add Barcode Pattern for Date
    (ex. '(20)(\d{6})' )
- Go to Barcode > Inventory Adjustment > Click on Add Product
  > In product, add value for that Barcode Pattern (ex. 20230614)

Error: A traceback appears: 'TypeError: expected string or bytes-like object'

When user add barcode of date for product
https://github.com/odoo/odoo/blob/ae94f14a844352f66490ec326fe2d1a716023891/addons/barcodes_gs1_nomenclature/models/barcode_nomenclature.py#LL156C25-L156C63
Here we will receive datetime.date datatype for value.
Now when it tries to match re with datetime.date, it will lead to the
above traceback.

sentry-4236166678

closes odoo/odoo#128424

X-original-commit: fbec8cd5cc3e75f2079928537a31d59a0b4ce03d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-13 19:28:32 +02:00
2023-07-12 11:19:58 +02:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%