Default barcode nomenclature¶
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.
Nota
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.
Importante
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.
Configurazione¶
To use default nomenclature, navigate to Barcode section, tick the Barcode Scanner checkbox. Doing so installs the Barcode app in the database.
. Under theNext, in the Barcode Nomenclature field, ensure Default Nomenclature is selected. Then, click Save.
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:
Nome regola |
Modello codice |
Field in Odoo |
---|---|---|
Weighted Barcodes 3 Decimals |
(21)….{NNDDD} |
Barcode field on product form |
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 be00000
. 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 is13500
.8
: check digit for211234500000
.
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 , and selecting the desired
product). In addition, the Unit of Measure is set to kg.
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
.
Ensure the products scan properly, by navigating to the 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.
Create rules¶
Importante
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 , 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.
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.
The Rule Name field is used internally to identify what the barcode represents.
The Sequence field represents the priority of the rule; meaning the smaller the value, the higher the rule appears on the table.
The barcode Type field represents different classifications of information that can be understood by the system (e.g., Package, Lot, Location, Coupon, 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.
After filling in the information, click the Save & New button to save the rule, and instantly start creating another rule. Or, click Save & Close to save the rule, and return to the table of rules.
Default nomenclature list¶
The table below contains Odoo’s list of Default Nomenclature rules. Barcode patterns are written in regular expressions.
Nome regola |
Tipologia |
Codifica |
Modello codice |
---|---|---|---|
Price Barcodes 2 Decimals |
Prodotto valutato |
EAN-13 |
23…..{NNNDD} |
Discount Barcodes |
Prodotto scontato |
Qualsiasi |
22{NN} |
Weight Barcodes 3 Decimals |
Prodotto pesato |
EAN-13 |
21…..{NNDDD} |
Customer Barcodes |
Cliente |
Qualsiasi |
042 |
Coupon & Gift Card Barcodes |
Buono sconto |
Qualsiasi |
043|044 |
Cashier Barcodes |
Cassiere |
Qualsiasi |
041 |
Location barcodes |
Posizione |
Qualsiasi |
414 |
Package barcodes |
Collo |
Qualsiasi |
PACK |
Lot barcodes |
Lotto |
Qualsiasi |
10 |
Magnetic Credit Card |
Carta di credito |
Qualsiasi |
%.* |
Codici a barre per prodotti |
Prodotto unitario |
Qualsiasi |
.* |
Nota
When the Barcode Pattern contains .*
, it means it can contain any number or type of
characters.
Vedi anche