Standard nomenklatur för streckkoder

Streckkodsnomenklaturer definierar hur streckkoder identifieras och kategoriseras. När en streckkod skannas associeras den till den första regeln med ett matchande mönster. Mönstersyntaxen beskrivs i Odoo’s nomenklaturlista med hjälp av ett reguljärt uttryck, och en streckkod läses framgångsrikt av Odoo om dess prefix och/eller längd matchar det som definieras i streckkodens regel.

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.

Observera

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.

Viktigt

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.

Konfiguration

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.

Aktiverade streckkodsinställning med Standardnomenklatur vald.

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:

Regelns namn

Streckkodsmönster

Fält i Odoo

Weighted Barcodes 3 Decimals

(21)….{NNDDD}

Barcode fält på produktformulär

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.

Skapa regler

Viktigt

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.

Standard Nomenklatur sida inställning av fält.

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.

Fältet Rule Name används internt för att identifiera vad streckkoden representerar.

Fältet Sequence anger regelns prioritet, dvs ju mindre värde desto högre upp i tabellen visas regeln.

Streckkodsfältet Type representerar olika klassificeringar av information som kan förstås av systemet (t.ex. 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.

När du har fyllt i informationen klickar du på knappen Spara & Ny för att spara regeln och omedelbart börja skapa en ny regel. Eller klicka på Spara & Stäng för att spara regeln och återgå till regeltabellen.

Standardlista över nomenklaturer

Tabellen nedan innehåller Odoo’s lista över Default Nomenclature regler. Streckkodsmönster skrivs i reguljära uttryck.

Regelns namn

Typ

Kodning

Streckkodsmönster

Pris Streckkoder 2 Decimaler

Prissatt Produkt

EAN-13

23…..{NNNDD}

Rabattstreckkoder

Rabaterad Produkt

Någon

22{NN}

Vikt Streckkoder 3 decimaler

Vägd Produkt

EAN-13

21…..{NNDDD}

Streckkoder för kunder

Klient

Någon

042

Kupong- och presentkortsstreckkoder

Kupong

Någon

043|044

Streckkoder för kassörer

Kassör

Någon

041

Streckkoder för plats

Plats

Någon

414

Streckkoder för förpackningar

Paket

Någon

PACK

Partiets streckkoder

Lot

Någon

10

Magnetiskt kreditkort

Kreditkort

Någon

%.*

Produktstreckkoder

Enhet Produkt

Någon

.*

Observera

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