Using variants (colour, size, fit)

Odoo has support for variants such as colour, size and fit.

When creating a product, you can specify multiple attributes (e.g. Size and Colour) and then select a series of values for each one:

Sales Variant Selection is new in Odoo 13, with two options for selecting variants in sales orders:

1. Order Grid Entry

2. Product Configurator

Configuration

Go to Sales / Configuration / Settings

  1. Select Variants
  2. Select Variant Grid Entry (if required)
  3. Select Product Configurator (if required)
  4. Save
  5. Click on “Attributes” (or can select from the menu)

Attributes

  1. Display type can be a radio button, select (dropdown) or colours
  2. Variant Creation has three options:
    • Instantly (default, simplest option).
    • Dynamically (variants are only created when needed)
    • Never
  3. In the “Attribute Values” tab, you can add or delete attribute values

Note: in Odoo 12 the variant creation options have different names, but the same functionality:

  • Always
  • On Demand (when the product is ordered)
  • Never

If the “Dynamically” / “On Demand” option is selected for an attribute it will apply to all the variants for products with that attribute.

The “never” option is useful if you want to record an attribute on an order but don’t need to maintain inventory at that level. You must have at least one attribute for which variants can be created, otherwise you will not be able to place orders!

Limit variants that can be sold

It’s possible to limit which variants can be sold (when using the Configurator and on the Website).

Here the black color is not available for Aluminium.

Click on “Configure Variants” in the Product Template:

Black is excluded for Aluminium (and Aluminium is $50.40 extra)

Database

Odoo has two closely linked Models (database tables) for products:

  1. Product Template (product.template)
  2. Product (product.product)

If you don’t use variants, then these two Models (tables) will be the same. The second one [product.product] is what is used for orders, inventory transactions, etc., so it is needed whether or not you have variants.

If you do use variants, then the “parent” item is on product.template and the variants (SKUs) are on product.product

There are several different scenarios:

  1. If a product has no attributes, a single record is created on product.product (dummy variant) 
  2. If a product does have attributes, multiple records can be created on product.product
    • If variants are created instantly / always (which is the default), then there will be one record for each of the combinations of attributes (e.g. 3 colours and 3 sizes = 9 variants).
    • If variants are created on demand / dynamically, then there will be one record for each combination of attributes that has been used.
    • If variants are never created for a particular attribute then there will be no records on product.product for that attribute, but it can be selected on an order.
      • This option should therefore only be used for an attribute that is recorded on an order but not used for recording inventory.

Add attributes to a product

It is possible to add attributes to a product that didn’t previously have them. This can be problematic, so it would be better to create a new product and stop using the old one, but if you do make this change please note:

  • The single (dummy variant) record on product.product will be archived (if there are orders or inventory) or deleted.
    • This is because (in this scenario, for a product with attributes) you can’t buy or sell “a T-Shirt” – you have to specify that you want a Blue XL T-Shirt.
  • However, if you have orders for the dummy variant, these can be processed through to completion (because the record on product.product was archived rather than deleted).
  • If you have inventory for the dummy variant you will need to make manual adjustments.

Changing attributes for a product

Odoo allows users to change the attributes for a product (e.g. you previously had sizes, now you add colours). This can also be problematic, so it would be better to create a new product and stop using the old one, but if you do make this change please note:

  • The existing records on product.product will be archived (if there are orders or inventory) or deleted.
    • If you have orders for these variants, these can be processed through to completion (because the record on product.product was archived rather than deleted).
    • If you have inventory you will need to make manual adjustments.

Use variants or not?

There are several advantages

  • Simpler data setup (one product and then multiple variants)
  • You can create variants on demand (e.g. 20 colours are theoretically available, but you only create each one when you first sell it).
  • Ordering can be easier with variants (Odoo can display the list of variants in a grid)
    • This works well in eCommerce
  • You can choose whether to have BoMs for products or variants.
    • BoMs for Products will have
      • a list of common components
      • others that apply to some variants (or use different quantities). 

But there are problems that need to be considered.

  • Adding attributes to a product is allowed, but can cause problems (as noted above)
  • Not all data can be setup for variants

15 thoughts on “Using variants (colour, size, fit)

  1. Do you know the way to show only the specific attributes of the selected variant in the specifications part of the ecommerce page, rather than showing a list of all the available attributes?

    For example my site currently shows:
    Colour: Green with Gold Luster or Bordeaux Wine or Dark Gray or Cream with Gold Luster or Silver Gray or Amaranth or Bean Green or Bronze or Brown or Forest Green or Gold or Lilac or Royal Blue or Silver or Violet

    Whereas, if I have the Lilac item selected I’d rather it just showed:
    Colour: Lilac

    Like

  2. In atributes, selecting the colour option, how can i make bicolor so Grey/Black and colour shown in circle being 2 colours?

    Like

    1. Hello Katie. This is now possible in Odoo 17. You can use an image to represent the attribute. For instance maybe you want the option to be Hammered Copper or Polished Copper, the configurator can display a sample of what those look like.

      Like

  3. Is there any way to select two values under one attribute? I have many options which aren’t mandatory, so its more of a yes or no to the option instead of which variant. For example, if I was selling a phone and there are options for adding a case, screen protector, selfie stick etc., could I have all of these values under one attribute and I can choose more than one?

    Many thanks.

    Like

  4. How can I add more Attribute values into a product using import or any other way than manually? For example for T-Shirt I have the attribute color and size, and for color I need to add the Red color. Is this possible?

    Like

  5. Is there any way that a specific attribute is chosen first? Case scenario: I have a product that has a color, a choice of two styles and comes in different quantities per case (case 1000, case 3000, etc.). Some colors exclude some case quantities. But I can’t get the settings to allow the web customer choose the Color first and the Case Quantity last – any suggestions? Thanks.

    Like

    1. I think it’s controlled by the sequence of the Attributes (in the Configuration menu). It’s a global setting for all products.

      Like

  6. Thanks for the tips!

    In my case, what happens is that I don’t need to create all the combinations of attributes. I mean, if for example I have 3 colours and 3 sizes = 9 variants, but I really only have 6. How can I create only these 6?

    Like

  7. Can’t we have attribute selection while creating a purchase order. I have lots of products with variants that we buy from a vendor having different lengths option. How do we store it in Odoo and select which length to choose while creating a purchase order?

    Like

Leave a comment