Hi,
I am building a module and I need to setup a lot of product.product from product.template with attribute
I have an xml for attribute :
<record id="attribute_type" model="product.attribute">
<field name="name">Type</field>
<field name="create_variant">1</field>
</record>
<record id="attribute_type_organic" model="product.attribute.value">
<field name="name">Organic</field>
<field name="attribute_id" ref="attribute_type"/>
</record>
<record id="attribute_type_regular" model="product.attribute.value">
<field name="name">Regular</field>
<field name="attribute_id" ref="attribute_type"/>
</record>
<record id="attribute_type_pending" model="product.attribute.value">
<field name="name">Pending</field>
<field name="attribute_id" ref="attribute_type"/>
</record>
and so on
How to link them to a product.template, how do I pass them to attribute_line_ids to create my product.product.
I know it should look like
'attribute_line_ids': [(4,0,[y for y in product_attributes])],
but how to produce product_attibutes (list of all combination of attributes/values)
Thant you for you help