Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting XML_ID for materialized relations #34

Open
emyllymaki opened this issue Oct 1, 2021 · 2 comments
Open

Setting XML_ID for materialized relations #34

emyllymaki opened this issue Oct 1, 2021 · 2 comments

Comments

@emyllymaki
Copy link

Hello, I've been using odoo_csv_import successfully with a v14 database.

One issue I'm haivng is how to set the xml_id on a materialized relationship - product_template_attribute_value.

This is a new object since v13 and is created by the product_template_attribute_line (also a new object) and so I am not seeing how to set this xml_id so that I can reference it later.

Maybe I am missing something obvious?

Thanks.

@emyllymaki emyllymaki changed the title Setting XMP_ID for materialized relLtions Setting XML_ID for materialized relations Oct 1, 2021
@gediminasvenc
Copy link

I was trying to use this script on v15, i tried to import products with variants, but also stuck at this new relationship field import. Maybe somebody could share how this can be done?

@Rad0van
Copy link

Rad0van commented Feb 8, 2022

Hello, I've been using odoo_csv_import successfully with a v14 database.

One issue I'm haivng is how to set the xml_id on a materialized relationship - product_template_attribute_value.

This is a new object since v13 and is created by the product_template_attribute_line (also a new object) and so I am not seeing how to set this xml_id so that I can reference it later.

Maybe I am missing something obvious?

Thanks.

Not having a solution here but just a bit of info as I was struggling with this quite much using normal import.

What I did is first importing product.template.attribute.line records like this:

product_tmpl_id_ext_id	attr_id	attr_values
CB 184 HC	attr_cooling	attr_cooling:water,attr_cooling:air

This assigns attribute to product.template and creates 2 product.template.attribute.values as possible options (attr_cooling:water and attr_cooling:air are external identifiers of attribute values).

I the exported created product.template.attribute.value records into Excel to have lookups. The I import attribute_line_ids for product.template using those lookups.

I guess you could import the separately like this:

ext_id	product_tmpl_id_ext_id	attr_id	attr_values
ptav_1	CB 184 HC	attr_cooling	attr_cooling:water
ptav_2	CB 184 HC	attr_cooling	attr_cooling:air

And then import attribute_line_ids using external identifiers.

Hope this makes sense and I didn't screw up describing it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants