product_variant_default_code
Automatically generate product variant internal references from template attributes using a reference mask and optional prefix.
Key Features
- product.template: Adds a reference prefix and configurable variant reference mask built from attribute names with separator support and token validation.
- product.template: Displays errors when required prefix or attribute value codes are missing and can set the prefix as the template default code for multi-variant products when configured.
- product.product: Auto-computes variant default_code from the mask by concatenating attribute and value codes unless a manual override flag keeps a custom code.
- product.attribute: Adds a unique attribute code field to supply identifiers that can be inserted into generated variant references.
- product.attribute.value: Adds a code field auto-filled from the value name to feed default_code generation for variants.
- res.config.settings: Offers options to switch between automatic and manual reference mask management and to use the reference prefix as each variant's default code.