Product Internal Reference Generator
This module allows to generate internal references for Product templates and variants using sequences, setting codes as read-only.
In product template, it's possible to choose among different Internal Reference Templates related to a sequence, and then generate an internal reference with the following structure:
Internal Reference Prefix + progressive number for variant, eg: “Main0001001”, where:
"Main0001" is the prefix generated by sequence and assigned to product template, and
"001" the variant identifier.
Every time a new variant is created, a new internal reference is automatically assigned with progressive variant code.
A specific access rights allows specific users to change internal reference template for a product template once an internal reference has been generated, as well as editing existing ones.
auto_awesome What this module does
AI-generated from the code · Odoo 16.0Automatically generates internal references for products and their variants using configurable sequences, and makes the reference read-only once set. Managers can define reference templates and generate prefixes from the product form.
This module lets you build product internal references automatically from numbered sequences instead of typing them by hand.
- Under Inventory > Configuration you get a new menu "Internal Reference Templates" where you create templates. Each template has a name, a linked sequence and a number of digits used for the variant part.
- On a product template form you pick an "Int. Ref. Template" and press the "Generate" button. Odoo then takes the next number from the template's sequence as the product prefix and creates a dedicated variant sequence, so the product gets a reference like a prefix plus a progressive variant number.
- Every time a new variant is created, its internal reference is filled in automatically with the next progressive number. Existing variants without a matching reference are also updated when you generate.
- Once a reference exists, the internal reference field becomes read-only on the product and variant forms, protecting the numbering. A special user group can keep the template field visible and edit references even after they are set.
- The module touches
product.template,product.productand the newproduct.code.sequencemodel, and adds fields for the template, the variant sequence and the prefix.
Depends on
Menus it adds
Models and fields (3)
- product.product · extends an existing model
- product.template · extends an existing modelvariants_prefix (Internal Reference Prefix), int_ref_template_id, variants_sequence_id
- product.code.sequence · new modelname, sequence_id, variant_reference_numbers (Digits)
Text generated by AI (DeepSeek) from reading the Odoo 16.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: 2 confirmed, 7 with no information of 9 versions.
Sources · Odoo 16.0
Confirmed on 2026-11-03 in branch 16.0 of OCA/product-attribute.
terminal Installation and usage
OCA documentation · Odoo 16.0Usage
Source · Odoo 16.0Go to inventory > Configuration > Internal Reference Templates and set:
the sequence to be used for Internal Reference Prefix generation
the number of digits to be used for variants code (standard is 3)
Now go to product template, select an Internal Reference Template and generate an Internal Reference Prefix. Internal reference field is now read-only.
Each time a new variant is created for this product template, an internal reference is automatically assigned.
No verified information in OCA: Installation, Configuration.
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.