OdooWiki OCA HUB

Product Template Has One Variant

product_template_has_one_variant folder_open OCA/product-attribute open_in_new
Uncategorised License: AGPL-3

This module allows to define a product template property 'Has one variant' that is True if the product has one product variant and only one.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds a 'Has One Variant' flag on product templates that is automatically true when the product has exactly one variant, and lets users filter products by this flag in the product search view.

This module extends the product template model (product.template) with a new stored, indexed boolean field called has_one_variant. The value is computed automatically: it is true when the product template has exactly one product variant, and false in all other cases (no variants or more than one variant). Because the field is stored, it can be used in searches and filters without recalculating each time.

In the Products search view, a new filter named 'Has One Variant' is added right after the existing 'Consumable' filter. Users can select it to show only products that have a single variant.

  • Automatic rule: the flag updates whenever the list of variants of a product changes.
  • Where it appears: Products search view, as a filter option.
  • Models touched: product.template only.

No menus, buttons, reports, emails or scheduled actions are added by this module. It is a small utility that helps identify simple products (one variant) versus products with multiple variants, for example to review or filter the product catalogue.

Depends on

product
Models and fields (1)
  • product.template · extends an existing modelhas_one_variant

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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 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.0

On product template list views, you can filter products that have only one product variant ('Has one Variant' filter name).

No verified information in OCA: Installation, Configuration.

info

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.