Odoo Community Association

Product Attribute Variant Rules

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

This module lets you write rules on a product template to control which variants are generated from its attributes.

Each rule is made of:

In preconditions and postconditions, values of the same attribute are ORed while values of different attributes are ANDed.

Table of contents

Usage

  1. Open the product template and go to the Attributes & Variants tab.
  2. Tick Use Attribute Rules.
  3. Add your rules (preconditions are optional) and choose their type.
  4. Save the product: the variants are generated again according to the rules.

A rule like:

“All products with blue or green color in XL size will appear only with a V neck collar and a short sleeve.”

is written as:

Preconditions: (color: blue), (color: green), (size: XL)
Type: Only With
Postconditions: (collar: V neck), (sleeve: short)

When the preconditions are empty the rule always applies. To only keep the variants with a short sleeve:

Preconditions: (none)
Type: Only With
Postconditions: (sleeve: short)

To remove all the variants with a sailor collar:

Preconditions: (none)
Type: Never With
Postconditions: (collar: sailor)

When several rules are defined, they are ANDed together.

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

  • Akretion

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.