Odoo Community Association

Create product variant from custom value

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

Create variants when configured custom attributes are used.

The created variants are useful to retrieve the stock quantity or for purchase.

Table of contents

Configuration

In any custom attribute value, enable Create custom variant.

Usage

When a product template is added to a sale order line, the configured custom values become real attribute values. Here is an example:

  1. Create an attribute “Length (cm)”
  2. Add some values to the attribute: - 5 - 10 - Custom
  3. For the “Custom” value, enable custom and Create custom variant (added by this module)
  4. Create a product template “Glass” having the created attribute and all its values
  5. Create a sale order that includes the product template
  6. Set the value 42 for the attribute “Length (cm)”

With the above steps, this module creates:

  • A new attribute value “42” for the attribute “Length (cm)”
    This attribute value is not linked to the product template, so it does not appear as a choice when the template is sold.
  • A variant for the template, linked to the created attribute value

The created variant can then be used to retrieve its stock quantity or to purchase that exact product variant that had been sold.

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

  • Aion Tech

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

This module is part of the OCA/product-attribute project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.