Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

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

Awatar
Odrzuć

Which module is this from ?

Najlepsza odpowiedź

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 :)

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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?

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 25
115
2
mar 15
7334
1
lis 24
1563
1
kwi 25
1792
3
paź 23
2762