This module is the bridge between GS1 barcodes and the warehouse app: it makes the measure a GS1 label carries the quantity picked, expressed in the unit the product is stocked in.
A GS1 label often states both, and they disagree: a box of cured meat carries "2 pieces" (AI 30) and "2.497 kg" (AI 310n). Which of the two is the quantity depends on how the product is stocked, something only the warehouse knows — kilograms make it the weight, units make it the count.
It installs itself as soon as both barcode_gs1 and barcode_stock are installed, and neither needs the other without it.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0When a GS1 barcode label states both a piece count and a weight or volume, this module makes the measure the picked quantity if the product is stocked in that kind of unit, so the warehouse records the right amount.
This module works inside the Barcode app's scanning screen. It does not add menus or new screens; it changes how a scanned GS1 label is turned into a quantity.
A GS1 label can carry several measures at once: a piece count (AI 30 or 37) and a net weight or volume (for example 2.497 kg). The module compares each measure on the label with the unit the product is stocked in. If the product is stocked in kilograms, the weight becomes the quantity; if it is counted in units, the piece count is kept. A weight never turns into a number of units.
- Measures describing the pack itself (gross weight, dimensions, volume of the logistic unit, AI 330n to 349n) are ignored.
- The chosen measure is converted into the product's stocking unit and rounded the way Odoo will store it, so the screen shows the quantity that will actually be saved.
- If the measure rounds to zero, the scan is treated as having no measure and the normal reading applies.
- For a packaging barcode, the precise measure replaces the pack's nominal quantity when it matches the product's unit.
The list of units of measure is loaded once when the Barcode app starts. If that loading fails, it is retried in the background on the next scan carrying a measure, and that scan keeps the basic reading.
It installs automatically once both the GS1 barcode and barcode stock modules are present, and it touches the scanning logic only.
Depends on
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/barcode-interface.
terminal Installation and usage
OCA documentation · Odoo 18.0Configuration
Source · Odoo 18.0Nothing to configure for the module itself. The precision a measure is kept at is Odoo's, though, and its defaults are coarser than most GS1 labels.
A measure becomes a quantity rounded twice, as anywhere in stock: to the Rounding Precision of the product's unit, and to the decimals of the Product Unit of Measure accuracy. Both default to two decimals, so the 2.497 kg a label states is stored as 2.50 kg, and the app shows 2.50 so that the quantity on screen is the one that will be stored.
To keep the grams a label states, for products stocked in kilograms:
- set the Rounding Precision of kg to 0.001, under Inventory → Configuration → Units of Measures → UoM Categories → Weight (the Units of Measure option must be enabled in the Inventory settings);
- set the digits of Product Unit of Measure to 3, under Settings → Technical → Database Structure → Decimal Accuracy (developer mode).
The accuracy applies to every quantity in the database, not only to scans.
Usage
Source · Odoo 18.0Installing barcode_gs1 next to barcode_stock brings this module in, and every screen that applies a scanned quantity uses it.
When a scanned GS1 barcode carries a measure, the unit that measure is in comes from the rule that read it (Unit of Measure on the barcode rule — AI 310n is kilograms, 320n pounds, 311n metres). It is then compared with the unit the product is stocked in:
- same kind of unit — the measure is the quantity, converted into the product's own unit: 2.497 kg on the label is 2497 for a product in grams;
- a different kind — a weight for a product counted in units, say — the measure says nothing about how many to pick, so the piece count on the label (AI 30/37) is the quantity, and a single unit when the label states none.
When a label states several measures (a net weight and a net volume, say), the first one in the product's kind of unit is taken. The gross weight and the other measures of the pack itself (AI 330n–349n) never are.
The quantity is rounded the way it will be stored, so what the screen shows is what ends up in stock. With Odoo's defaults that is two decimals: 2.497 kg is 2.50 for a product in kilograms (see Configuration to keep the grams). A measure that rounds to nothing (4 g, for a product in kilograms kept to two decimals) is not taken: the scan reads as one without a measure.
When the GTIN is a packaging barcode (a carton of twelve, say), a label without a count picks the pack's quantity, and a count on the label wins over it. A measure in the product's own kind of unit wins over both: a carton of cheese weighing 4.32 kg is 4.32 for a product stocked in kilograms, not twelve.
The units of measure are read when the app opens. Should that fail, they are read again on the next scan that carries a measure; that one scan reads as if it carried none.
Without this module GS1 barcodes are still parsed, but a measure is never the quantity: the warehouse app takes the piece count, or a single unit (the pack's quantity for a packaging barcode).
No verified information in OCA: Installation.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.