Skip to main content

Provides an abstract model for product variant configuration.

Project description

License: AGPL-3

Product Variant Configurator

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.

Configuration

(after installing sales application)

To configure the creation of the variants behaviour, you need to:

  1. Go to Sales > Settings > Configuration, and select “Products can have several attributes, defining variants (Example: size, color,…)” on “Product Variants” section.

  2. Go to Sales > Products, and select a product.

  3. On the Variants tab edit the value of the field Variant Creation.

  4. If you want to stop the automatic creation of the variant, and have the same behaviour for all the products in the same category, go to Sales > Products > Product Categories, select the category and check the checkbox Don't create variants automatically.

Usage

(after installing sales application)

  1. Go to Sales > Sales > Product Variants.

  2. Click on “Create” button for creating a new one.

  3. On the field “Product Template”, select a product template that has several attributes.

  4. A table with the attributes of the template will appear below.

  5. Select all the attribute values and click on “Save” button.

  6. A new product variant will be created for that attributes.

  7. An error will raise if there’s another variant with the same attribute values or if you haven’t filled all the required values.

Developers

To use product configurator in your model, you need to:

  1. The product.configurator is an abstract model, hence, to be used it must be inherited in your model:

  2. If the model you’re inheriting has name attribute, and it uses the related parameter you must override it.

class AModel(models.Model):
    _inherit = ['module.model', 'product.configurator']
    name = fields.Char(related="delegated_field.related_field")
Try me on Runbot

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 smashing it by providing a detailed and welcomed feedback.

Credits

Images

  • Odoo Community Association: Icon.

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file odoo10_addon_product_variant_configurator-10.0.2.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for odoo10_addon_product_variant_configurator-10.0.2.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 a6a43bf0c26ddd13b2d55164119c23ea48981080cc3e1ce3b89bbdff960bcde1
MD5 f0546fbdc2e548cace40596b8b93ab81
BLAKE2b-256 f8c5a58f01e752ef8b90b6791234bbc8369af2550177dd37deb2f7dc2294f842

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page