TIP: You can type at any time to perform a new search.
Product Variant Configurator
product_variant_configurator · OCA/product-variant
- Repository
- OCA/product-variant · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Product Variant
- Folder size
- 1.87 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/product-variant
- Last tracking update
- 2026-08-07 09:06:27
- Authors
- ACSONE SA/NV, Odoo Community Association (OCA), AvanzOSC, Tecnativa
- Maintainers
- ACSONE SA/NV, Odoo Community Association (OCA), AvanzOSC, Tecnativa
- Committers
- Weblate, OCA-git-bot, oca-ci, arantxa-s73
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- purchase_variant_configurator, sale_variant_configurator
- Description
Provides an abstract model for product variant configuration. It provides the basic functionality for presenting a table with the attributes of a template and the possibility to select one of the valid values. You can try this functionality creating a product variant directly selecting a product template that has attributes. This module also prevents in a configurable way the creation of the product variants when defining the attributes and attribute values of the product template.
Code Analysis ⓘ
Views touched (6)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_attribute_view_form |
product.attribute.form | product.attribute | form | Inherits product.product_attribute_view_form |
product_category_no_variant_form_view |
product.category.no.variant.form | product.category | form | Inherits product.product_category_form_view |
product_template_no_variant_form_view |
product.template.no.variant.form | product.template | form | Inherits product.product_template_only_form_view |
product_variants_view |
product.product.variants.form | product.product | form | Inherits product.product_normal_form_view |
product_variants_view_2 |
product.product.variants.form | product.product | form | Inherits product_variant_configurator.product_variants_view |
view_product_configurator_tree |
product.configurator.attribute | list | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (9)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (1)-
create(self, vals_list)@api.model_create_multiLink created attribute value to the associated template if proceed. This happens when quick-creating values from the product configurator.
New fields (1)
-
no_create_variantsBooleandefault=Truehelp='This check disables the automatic creation of product variants for all the products of this category.'string="Don't create variants automatically"
-
onchange_no_create_variants(self)@api.onchange('no_create_variants') -
write(self, values)
New fields (7)
-
can_create_productBooleancompute='_compute_can_be_created' -
create_product_variantBooleanstring='Create product now!' -
price_extraFloatcompute='_compute_price_extra'digits='Product Price'help='Price Extra: Extra price for the variant with the currently selected attributes values on sale price. eg. 200 price extra, 1000 + 200 = 1200.' -
product_attribute_idsOne2many → product.configurator.attributecomodel_name='product.configurator.attribute'copy=Truedomain=<expr>inverse_name='owner_id'string='Product attributes' -
product_idMany2one → product.productcomodel_name='product.product'string='Product Variant' -
product_id_configurator_domainBinarycompute='_compute_product_id_configurator_domain'readonly=Truestore=False -
product_tmpl_idMany2one → product.templatebypass_search_access=Truecomodel_name='product.template'string='Product Template'
-
create(self, vals_list)@api.model_create_multiFill `product_tmpl_id` in case `product_id` is supplied but not the other one. -
create_variant_if_needed(self)Create the product variant if needed. It searches for an existing product with the selected attributes. If not found, create a new product. :returns: the product (found or newly created) -
unlink(self)Mimic `ondelete="cascade"`.
New fields (7)
-
attribute_idMany2one → product.attributecomodel_name='product.attribute'readonly=Truestring='Attribute' -
owner_idMany2oneReferenceindex=Truemodel_field='owner_model'required=Truestring='Owner' -
owner_modelCharrequired=True -
possible_value_idsMany2many → product.attribute.valuecomodel_name='product.attribute.value'compute='_compute_possible_value_ids'readonly=True -
price_extraFloatcompute='_compute_price_extra'digits='Product Price'help='Price Extra: Extra price for the variant with this attribute value on sale price. eg. 200 price extra, 1000 + 200 = 1200.'string='Attribute Price Extra' -
product_tmpl_idMany2one → product.templatecomodel_name='product.template'required=Truestring='Product Template' -
value_idMany2one → product.attribute.valuecomodel_name='product.attribute.value'domain="[('id', 'in', possible_value_ids)]"string='Value'
No public methods.
New fields (0)
No new fields.
Public methods (2)-
template_price_get(self, prod_id, qty, partner=None) -
template_price_rule_get(self, prod_id, qty, partner=None)
New fields (0)
No new fields.
Public methods (1)-
create(self, vals_list)@api.model_create_multi
New fields (1)
-
no_create_variantsSelectiondefault='no'help='This selection defines if variants for all attribute combinations are going to be created automatically at saving time.'required=Truestring='Variant creation' args: [('yes', "Don't create them automatically"), ('no', "Use Odoo's default variant management"), ('empty', 'Use the category value')]
-
create(self, vals_list)@api.model_create_multi -
name_search(self, name='', domain=None, operator='ilike', limit=100)@api.model -
onchange_no_create_variants(self)@api.onchange('no_create_variants') -
write(self, values)
New fields (1)
-
requiredBooleandefault=False
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…