Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

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
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

Hi,

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

Avatar
Zrušit

Which module is this from ?

Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
183
2
bře 15
7382
1
lis 24
1579
1
dub 25
1800
3
říj 23
2780