Makes barcode field required, defaults it to product's code.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets you make the barcode mandatory on products, with a company-wide setting. When enabled, products without a barcode cannot be saved, and the barcode is pre-filled from the internal reference.
This module adds a company setting that makes the product barcode a required field. You turn it on in Settings, in the new "Products barcode" section, with the option "Make barcode required". The setting is stored per company and is only visible to users who can manage product variants.
Once enabled, Odoo checks products when they are created or modified. If a product is not a service and has no barcode, saving is blocked with an error listing the products that have no barcode. Products with several variants are excluded from this rule, and the barcode field is hidden on the template form when the product has more than one variant.
On the product forms (both the normal product form and the simplified variant edit form), the barcode field becomes mandatory when the rule applies. When you type an internal reference (default_code) on a product that still needs a barcode, Odoo automatically copies that reference into the barcode field.
The module touches product.template, product.product, res.company and res.config.settings. It also provides a reusable mixin, product.barcode.required.mixin, so other modules can apply the same barcode check in their own constraints.
Depends on
Models and fields (5)
- res.company · extends an existing modelproduct_variant_barcode_required
- product.product · new model
- product.template · new model
- res.config.settings · extends an existing modelproduct_variant_barcode_required
- product.barcode.required.mixin · new modelis_barcode_required
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: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/product-attribute.
terminal Installation and usage
OCA documentation · Odoo 18.0Configuration
Source · Odoo 18.0Go to "Settings -\> General -\> Products" and enable "Product variant barcode required".
No verified information in OCA: Installation, Usage.
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.