Generate XML IDs for Product Template Attribute Values

Beta License: LGPL-3 GetFluvo/addons

This module gives every product.template.attribute.value record a predictable XML ID, so that product variants can be referenced in imports and integrations without looking up database ids.

When Odoo creates a template attribute value, the module adds an XML ID product_template_attribute_value.<template>_<value>, where:

Characters other than letters, digits and underscores are replaced by _.

No XML ID is generated when the template or the attribute value has no XML ID (the result would not be predictable), or when the name is already used by another record; the latter is logged as a warning.

Table of contents

Use Cases / Context

Purpose:

The module ensures that every product.template.attribute.value record has a predictable and consistent XML ID, which is crucial for:

Data Integration: Facilitating seamless data exchange with external systems that rely on stable identifiers. Automation: Simplifying automated processes within Odoo that need to reference specific attribute value combinations.

Use Cases:

E-commerce platforms that need to synchronize product variant data with Odoo. Warehouse management systems that rely on unique identifiers for product configurations. Any scenario where stable and predictable identifiers for product attribute combinations are required. This description provides a good overview of the module’s purpose and functionality.

Installation

[ This file must only be present if there are very specific installation instructions, such as installing non-python dependencies. The audience is systems administrators. ]

Configuration

To configure this module, you need to:

  1. Ensure that the product module is installed in your Odoo instance, as this module is a dependency.
  2. Place the product_template_attribute_value_xmlid module directory in your Odoo addons path.
  3. Install the product_template_attribute_value_xmlid module through the Odoo Apps interface.

Usage

XML IDs are generated automatically when attribute values are added to a product template.

To generate the XML IDs of records that existed before the module was installed:

  1. Go to Sales > Configuration > Product Template Attribute Values.
  2. Open any record.
  3. Click Generate XML IDs.

All template attribute values without a generated XML ID get one, if their template and attribute value have an XML ID.

Known issues / Roadmap

Changelog

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

Authors

  • Fluvo

Maintainers

This module is part of the GetFluvo/addons project on GitHub.

You are welcome to contribute.