تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    الحصول على عرض توضيحي
  • الأسعار
  • المساعدة

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • إدارة علاقات العملاء
  • e-Commerce
  • المحاسبة
  • المخزون
  • PoS
  • المشروع
  • MRP
All apps
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

How to import images for products in binary to the database?

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
productimportimagev7
12 الردود
40310 أدوات العرض
الصورة الرمزية
Julián Lozano

I'd like to know how to do batch import of images for the products and if its better import products first and then the products images or both at the same time.

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

I am most interested in the straigh forward way. How is this?

ABU K

I would first import the products (e.g. with the Import-Wizard) and afterwards I would import the product images. My tip to batch import images: rename the image files according to your products (.jpg or .jpg) Write a short python script which loops over the image files, encode with base64 and write to OpenERP with XMLRPC

الصورة الرمزية
marc@k-ssuto.com
أفضل إجابة

Here the complete procedure for Linux users :

1/ import all your products

2/ export your products : this step is mandatory to get the external ID of your product. In my case I exported Name (that is mandatory) and ean13 since the picture's filename was name as follow :

ean13_code.jpg

3/ open your exported file (product.product.csv) with libreoffice and save it again with option "edit filter settings" in order to change the CSV separator to whatever else than ",". This is a little trick to avoid complicated script to deal with record that embed a coma.

4/ use the following script :

    #!/bin/bash
    # Usage : MakeBase64CSV.sh infile.csv outfile.csv
    # infile.csv columns are : externalID, name, filename or identifier
    # infile.csv separator MUST BE |

echo \"External ID\",\"Name\",\"image\" > $2

while IFS="|" read f1 f2 f3; do

    # recopy external ID and name
    echo -n $f1,\"$f2\", >> $2

    #If third column represents the picture's filename (not the key), please use this command
    #cat $(echo ${f3} | tr -d '\r' | tr -d '"') | base64 --wrap=0 >> $2

    #If third column represents the key to match with the filename, please use this command
    cat $(echo ${f3} | tr -d '\r' | tr -d '"').jpg | base64 --wrap=0 >> $2

    #Carrier return at end of line
    echo  >> $2
done < $1

5/ then use your script

./MakeBase64CSV.sh product.product.csv out.csv

In my example, all the pictures are in the same directory.

6/ you can now import your file out.csv into openERP. (Don't forget to change the CSV separator).

7/ If you run into the following error :

field larger than field limit (131072)

Please do the following :

  • modify the file addons/base_import/models.py
  • add the following line at the very begining of the _convert_import_data function :

    csv.field_size_limit(2097152)

  • delete the file addons/base_import/models.pyc

  • restart your server
  • redo the import of your out.csv file
11
الصورة الرمزية
إهمال
gunnar

hi Marc, would you mind to correct the line that has been identified as faulty (if the complaint is correct)?

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

I encountered a few problems when using Marc's steps, but I sorted it out.

  1. The one but last line in the bash script needs to be echo \" >> $2, and not echo >> $2
  2. I ran into the field limit, mentioned in step 7. Adding the line csv.field_size_limit(2097152) did not help. Instead, I added the line at the very top of the function _read_csv in models.py

After making these changes, I was able to generate an import file, and to import pictures to my products.

Bart

2
الصورة الرمزية
إهمال
Nicolás Visús

Hi Bart, you solved it? I did the script but when i try to import "out.cvs" on "odoo import page", the system doesn't recognice the file. Would you explain me how you did? At least until you gave the error... Thanks

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

I have uploaded a module on odoo apps that can help achieve this need.  https://apps.odoo.com/apps/modules/9.0/product_image_from_url/ 

My module employs the concept of importing the images as URLs using a normal csv/ excel import file. You can then download the images from the imported URLs in batch. I hope this will help.

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

Dear all,

thanks for this post. I managed to create an upload file for my pictures.

Unfortunately i run into the "field larger than field limit" error. I tried to add the "csv.field_size_limit(2097152)" into the model.py file, deleted the models.pyc file and restarted the server.

However no matter where i put the csv.field_size_limit statement the openerp either does not work or shows the same failure.

Could you please post specify more precisly where i have to put the csv.field_size_limit?

thanks, Thomas

0
الصورة الرمزية
إهمال
الصورة الرمزية
Nicolás Visús
أفضل إجابة

Is need to put the line csv.field_size_limit(2097152) (or a bigger number. Depends of image size) in lines 230 and 271, next to "_read_csv" and "convert_import_data" lines into addons/base_import/models.py file.

Then follow the instructions above.

 

0
الصورة الرمزية
إهمال
michel Guénard

Your file should have the extension csv NOT cvs!

Nicolás Visús

Yes. Mi file ("out.csv") have a CSV extension. My mistake was in having skipped the step of modifying "csv.field_size_limit (2097152)". Now it works! Thanks for your answer

الصورة الرمزية
Nicolás Visús
أفضل إجابة

Is need to put the line csv.field_size_limit(2097152) (or a bigger number) in lines 230 and 271, next to "_read_csv" and "convert_import_data" lines into addons/base_import/models.py file.

Then follow the instructions above.

0
الصورة الرمزية
إهمال
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
How to import product images ? تم الحل
product import image
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
3
نوفمبر 24
15228
OpenERP 7: save product images as files?
product image v7
الصورة الرمزية
الصورة الرمزية
1
مارس 15
5968
Import Products with supplier and purchase price
product import v7
الصورة الرمزية
الصورة الرمزية
1
مارس 15
9776
Cannot see imported products
product import v7 csv
الصورة الرمزية
الصورة الرمزية
3
يوليو 19
7146
How to convert & import folder of images?
product import image v10
الصورة الرمزية
الصورة الرمزية
3
يونيو 17
9209
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now