Barcode GS1 Stock
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.
Table of contents
Configuration
Nothing 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
Installing 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).
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/barcode-interface project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Metadata
Release files for odoo-addon-barcode-gs1-stock 18.0.1.0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_addon_barcode_gs1_stock-18.0.1.0.0.3-py3-none-any.whl | Python 3 | none | any | Details for odoo_addon_barcode_gs1_stock-18.0.1.0.0.3-py3-none-any.whl |
Release files / odoo_addon_barcode_gs1_stock-18.0.1.0.0.3-py3-none-any.whl
| Download URL | odoo_addon_barcode_gs1_stock-18.0.1.0.0.3-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4252f3969200ca35a936b8b315c61c85c87feefcf695bbcd6dedfaee0e48618
|
|
BLAKE2b-256 checksum How to use checksums |
f455ca5f5f90e3976b08c484afd0760b21ad51c5eec7f32ce2170bf02ce78418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for odoo-addon-barcode-gs1-stock 18.0.1.0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.