Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

In the Inventory app, does anyone know how to import Product Categories so as to preserve parent/child relationships.

Relations of depth 1, I can do.  For example, if I want to make two new categories (Metals, Plastics) as children of the default "All" category, I can import the following spreadsheet:

id

name

child_id/name

product.product_category_all

All

Metals



Plastics

But I can't for the life of me figure out how to import fields of depth greater than 1.

For example, if I wanted the following Product Categories structure:

  • All / Metals

  • All / Metals / Aluminium

  • All / Metals / Steel

  • All / Plastics

  • All / Plastics / Nylon

  • All / Plastics / PVC

Can anyone advise on how I can format a spreadsheet for import in to Odoo, to recreate the above Product Categories?

Odoo Enterprise v12

Avatar
Annuleer
Beste antwoord

Is there still no 1-step import solution for this? I need to import 250 categories up to 5 levels deep.

Avatar
Annuleer
Beste antwoord

Hi,

   Please refer this sheet   https://ibb.co/QF0SqLQ        

Avatar
Annuleer

Which module is this from ?

Beste antwoord

Anyone know how this can be done with a single import step, using a single spreadsheet?

Control the external ID yourself, then you can import all of your categories, both parent/child category.

For example,

External IDParent External IDProduct Category Name
M0
Metals
M1M0Aluminium
M2M0Stainless Steel

Hope this help :)

Avatar
Annuleer
Auteur Beste antwoord

The only workaround way I can figure is to:

  1. Ensure that the Product Categories "All / Metals" and "All / Plastics" already exists in the Odoo database (see instructions in original post). 

  2. Select the "All / Metals" Product Category in Odoo, and click "Action -> Export" 

  3. Select "Update data (import-compatible export)" radio button, then export the "External ID" field.

  4. Repeat 2-3) for the "All / Plastics" category

  5. Copy and paste the External IDs into the following new spreadsheet, which can be imported into the Odoo Inventory Product Categories:


id

child_id/name

(paste "All / Metals" External ID here)

Aluminium


Stainless Steel

(paste "All / Plastics" External ID here)

Nylon


PVC

This works, but is obviously not ideal, as the intent is to just recreate the entire Product Categories parent/child structure using a single spreadsheet.

Anyone know how this can be done with a single import step, using a single spreadsheet?

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 25
113
2
mrt. 15
7329
1
nov. 24
1561
1
apr. 25
1791
3
okt. 23
2760