Skip to Content
Menu
This question has been flagged

Good morning.


I am using Odoo 16 community, and I am importing products with variants, but I also need to indicate certain exclusions for some combinations of variants (for the same product that I am importing).


For example, for a specific product, for the size:large variant, I want to exclude the color:white variant.


The csv works fine, it imports the products and their variants, but I have no idea how to indicate the "exclude for" column.


This is the structure of the csv:


id name attribute_line_ids / id attribute_line_ids / attribute_id attribute_line_ids / value_ids attribute_line_ids / product_template_value_ids / id attribute_line_ids / product_template_value_ids / product_attribute_value_id
t001 t-shirt t001_a size short,medium,large t001a_1 short
t001a_2 medium
t001a_3 large
t001_b color black,white,red t001b_1 black
t001b_2 white
t001b_3 red


My idea is to add a column for the "exclude for", but I can't get it to work.


If I export the "exclude for" field of a hand-created product, the value is this:



attribute_line_ids/product_template_value_ids/exclude_for

product.template.attribute.exclusion,1


Any ideas?


Thanks in advance!

Avatar
Discard
Author Best Answer

Hi Jason, thanks for your comment.


I have never used Studio so I don't quite understand your explanation. I'll try to do it later by looking at the screenshots.


Any details you can add will be more than welcome.


Thank you, good day!

Avatar
Discard

From the main screen in your odoo database open the Inventory module, then open Studio.
Then click "Edit Menu" and "New Menu" and select the "product.template.attribute.exclusion" model and place the new menu item under the "Master Data" menu item.
My first screenshot shows a good chunk of the process.
Don't nest further unless you plan on duplicating items that are already there. Nesting turns a menu item into a non-clickable header. I have linked to a Cybrosys video on YouTube relating to customizing the menus.
https://youtu.be/GF88hB-qha0?si=ic3YyqqXU34HhSMx

Author

Hi Jason, thanks for your response. This forum is unusual and won't let me respond directly to your last comment.

I think my problem is that since I am using Odoo 16 Community, it does not allow me to activate "Odoo Studio".

Thanks anyway, good day!

Best Answer

Pedro,

   I found myself looking for the same functionality.  Like you, I could only find reference to already created "attribute_line_ids/product_template_value_ids/exclude_for" IDs, which does not allow you to build new exclusion lists.  I have a line of products which requires two attributes, let us call them "X" and "Y".  Both "X" and "Y" have about 25 values to be applied to each item.  Unfortunately, each attribute value in "X" is only compatible with somewhere between 1-7 (lets say about 5) of the values in "Y" and vice versa.  This means about 1,000 exclusions to be manually entered per item because an exclusion list has to be created for each attribute value in "X" and "Y" (25 values x (25 values - 5 not excluded) x (1 for "X" + 1 for "Y") = 1000).  So, manual entry is extremely time consuming, even when optimizing the manual entry process.


Using Studio, I added a Menu Item in the Inventory work flow using the "product.template.attribute.exclusion" model.  This may have been overkill as the data is available in the "Inventory>Master Data>Product Attribute Values" menu.  However, there is no way to import values back in and I could not remember how to add that capability.  So, this is why I added the "product.template.attribute.exclusion" model to the menu.  Now I have the ability to import  the exclusion lists using the "Exclude for/Attribute Values/ID" (ex. "__export__.product_template_attribute_value_197774_245356d0") or perhaps the "Exclude for/Attribute Values" (ex. "X: 12345").


It is late in the day, so I haven't tried importing yet.  I will update this post if I have any problems.



Edit: I have had success importing the exclusions list.  The fields you want to use are as follows:

Product Template/External ID   (Ex. "__export__.product_product_12345_d737ce8e_product_template")

Attribute Value / External ID   (Ex.  "__export__.product_template_attribute_value_123456_3dfd755c")

Attribute Values/External ID   (Comma Separated.  Ex. "__export__.product_template_attribute_value_789012_135e0b87,__export__.product_template_attribute_value_345678_7205c8d5,...")


Avatar
Discard
Best Answer

Hi Pedro,

I have had success with applying manual variation like the following video you can refer to: https://www.youtube.com/watch?v=VyhwkhnwIck&list=PLSKcWRTtEl5qzvRaI-VTGavfReiHS_EEb&index=6

Avatar
Discard
Related Posts Replies Views Activity
2
Jan 24
3083
1
May 23
1908
2
Apr 23
2838
3
Dec 22
7710
3
Feb 24
2060