تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
12118 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

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

الصورة الرمزية
إهمال

Which module is this from ?

أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 25
113
2
مارس 15
7329
1
نوفمبر 24
1561
1
أبريل 25
1791
3
أكتوبر 23
2760