Nomenclatura implicită a codurilor de bare

Define barcode nomenclatures to ensure Odoo correctly recognizes and categorizes barcodes. When scanned, a barcode matches the first rule with a matching pattern, based on regular expressions. A barcode is successfully read if its prefix and/or length matches the defined rule.

For instance, at a Point of Sale station, product weight barcodes in the European Article Number (EAN) format, which begin with 21 and have five digits specifying the weight, are used to weigh products and generate a barcode depicting the weight and price. The 21 and five-digit weight is the barcode pattern used to identify the barcode and can be customized to ensure Odoo correctly interprets all barcodes for the business.

Notă

Barcodes are also commonly used with Odoo’s Inventory and Barcode apps.

Odoo Barcode supports EAN, Universal Product Code (UPC), and GS1 formats. This document exclusively focuses on default rules and patterns in Odoo, which use UPC and EAN encoding.

Important

To use UPC and EAN barcodes for uniquely identifying products across the entire supply chain, they must be purchased from GS1.

In Odoo, custom barcode patterns can be defined to recognize barcodes specific to the company. Barcodes do not need to be purchased if used only within the company, such as in the example where the barcode is written in the EAN format.

Configurare

To use default nomenclature, navigate to Inventory app ‣ Configuration ‣ Settings. Under the Barcode section, tick the Barcode Scanner checkbox. Doing so installs the Barcode app in the database.

Next, in the Barcode Nomenclature field, ensure Default Nomenclature is selected. Then, click Save.

Setarea codului de bare activată cu Nomenclatura implicită selectată.

With the Barcode module installed, and the Default Nomenclature selected, the barcode actions using UPC and EAN, detailed in the default nomenclature list, are available for use. And, by default, Odoo automatically handles UPC/EAN conversion.

Example: product weight barcode

To better understand how barcode nomenclature is used to identify products in Odoo, this example where product weight barcodes in EAN format are used to allow a Point of Sale business to automatically print barcodes, and calculate the price using the weight of the item.

To set up barcodes for weighted products, the following rule is used:

Numele regulii

Șablon cod bare

Câmp în Odoo

Weighted Barcodes 3 Decimals

(21)….{NNDDD}

:guilabel:Câmpul Cod de bare din formularul produsului

Example

To better understand the barcode pattern for weighted products, consider the barcode, 2112345000008:

  • 21: code that identifies this a barcode for weighted products.

  • 12345: five digits (denoted by ..... in the table above) that identify the product.

  • 00000: five digits (denoted by {NNDDD} in the table) representing the weight of the product. On the product form, the five weight values must be 00000. The first two digits are whole number values, and the last three digits are decimal values. For example, „13.5 grams” in the {NNDDD} format is 13500.

  • 8: check digit for 211234500000.

Together, these components make up a 13-character EAN - 13 barcode.

To configure the product barcode for Pasta Bolognese, the EAN barcode for weighted products, 2112345000008, is entered in the Barcode field on the product form (accessible by going to Inventory app ‣ Products ‣ Products, and selecting the desired product). In addition, the Unit of Measure is set to kg.

Barcode field on the product form.

Next, a customer’s bowl of pasta is weighed to be 1.5 kilograms. This generates a new barcode for the pasta, according to the weight: 211234501500, which has a check digit of 2. The new barcode is 2112345015002.

Generated barcode that includes a weight of 1.5 kg.

Ensure the products scan properly, by navigating to the Barcode app ‣ Operations. Next, click any operation type, such as Receipts. Then, click the New button to create a draft stock move. Scan the product weight barcode, such as 2112345015002, and if the intended product appears, the barcode setup is correct.

Show successfully scanned barcode.

Creați reguli

Important

Adding new rules is necessary for UPC and EAN formats that are not in Odoo’s default list, since barcodes cannot be read successfully if there are unknown fields.

While new rules can be created, Odoo fields do not auto-populate with information from these rules. Custom development is required for this functionality.

To create a rule, first enable developer mode. Then, navigate to Inventory app ‣ Configuration ‣ Barcode Nomenclatures, and select Default Nomenclature.

On this page, configure the following optional fields:

  • UPC/EAN Conversion: determines if a UPC/EAN barcode should be automatically converted when matching a rule with another encoding. Options include Always (the default option), Never, EAN-13 to UPC-A, and UPC-A to EAN-13.

  • Is GS1 Nomenclature: ensure this checkbox is not ticked, as the Default Nomenclature uses UPC and EAN encoding, not GS1 encoding.

Câmpuri de setare a paginii Nomenclatură implicită.

On the Default Nomenclature page, click Add a line at the bottom of the table, which opens a Create Rules pop-up window to create a new rule.

Câmpul Numele regulii este folosit intern pentru a identifica ce reprezintă codul de bare.

Câmpul Sequence reprezintă prioritatea regulii; adică cu cât valoarea este mai mică, cu atât regula apare mai mare pe tabel.

Câmpul cod de bare Tip reprezintă diferite clasificări ale informațiilor care pot fi înțelese de sistem (de exemplu, Pachet, Lot, Locație, :guilabel:`Cupon `, etc.).

The Encoding field specifies which encoding the barcode uses. This rule only applies if the barcode uses this specific encoding. The available Encoding options are: EAN-13, EAN-8, UPC-A, and GS1-28.

The Barcode Pattern field represents how the sequence of letters or numbers is recognized by the system to contain information about the product. Sometimes, when a certain amount of digits are required, the number of . is shown. N represents whole number digits, and D represent decimal digits.

Example

1... represents any 4-digit number that starts with 1. NNDD represents a two digit number with two decimal points. For example, 14.25 is 1425.

După ce ați completat informațiile, faceți clic pe butonul Salvare și nou pentru a salva regula și începe instantaneu să creați o altă regulă. Sau faceți clic pe Salvați și închideți pentru a salva regula și reveniți la tabelul de reguli.

Lista de nomenclatură implicită

Tabelul de mai jos conține lista Odoo de reguli Nomenclatura implicită. Modelele de coduri de bare sunt scrise în expresii regulate.

Numele regulii

Tip

Codificare:

Șablon cod bare

Preț coduri de bare 2 zecimale

Produs cu preț

EAN-13

23…..{NNNDD}

Reducere coduri de bare

Produs cu reducere

Oricare

22{NN}

Greutate coduri de bare 3 zecimale

Produs cântărit

EAN-13

21…..{NNDDD}

Codurile de bare ale clienților

Client

Oricare

042

Coduri de bare cupon și card cadou

Cupon

Oricare

043|044

Codurile de bare pentru casierie

Casier

Oricare

041

Codurile de bare de locație

Locatie

Oricare

414

Cod de bare pachet

Pachet

Oricare

PACK

Loturi de coduri de bare

Lot

Oricare

10

Card de credit magnetic

Card de credit

Oricare

%.*

Cod bare produs

Unitate produs

Oricare

.*

Notă

When the Barcode Pattern contains .*, it means it can contain any number or type of characters.