Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Importing Images from a Google Drive Folder (massive) to Odoo

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
quickstartQuickstartQuickstar
1 Responder
3652 Vistas
Avatar
Sergio Antonio Macedo Herrera (samh)
Importing Images from a Google Drive Folder (massive)


There are many cases where product images need to be imported (massive). The only way to do this is by obtaining the direct link to the image so that Odoo can read and import it. However, tools like Google Drive and Google Sheets can help us quickly obtain a URL for the image.



2
Avatar
Descartar
Avatar
Sergio Antonio Macedo Herrera (samh)
Autor Mejor respuesta

Importing Images from Google Drive to Odoo


Part 1: Setting up Google Drive and Import Template


Create a folder in Google Drive with the following access permissions:

General access: Anyone with the link - Viewer.



In this Google Drive folder, you can only upload images in JPG, JPEG, and PNG formats; other formats like WebP, PDF, AVIG, etc., are not supported.


In a Google Sheet, create an App Script:

Go to: Spreadsheet > Extensions > App Script.



Clicking on this section will open a new tab. We need to rename it and add the following code:


Code

function generateCSV() {

  var folderId = '1FWSmcU5f5B4PAidjdvIHgl-7zVzVxKnS'; // Replace with your Google Drive folder ID

  var folder = DriveApp.getFolderById(folderId);

  var files = folder.getFiles();

 

  var data = [];

  while (files.hasNext()) {

    var file = files.next();

    var fileName = file.getName();

    var fileId = file.getId();

    var link = 'https://drive.google.com/uc?export=view&id=' + fileId;

    data.push([fileName, link]);

  }

 

  var sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet('Image Links');

  sheet.appendRow(['product_name', 'image_url']);

 

  for (var i = 0; i < data.length; i++) {

    sheet.appendRow(data[i]);

  }

 

  SpreadsheetApp.getUi().alert('The CSV data has been created in the "Image Links" sheet.');

}



Google Drive Folder ID

In the second line of the code:


We will place the ID of our folder with images. To obtain the ID, open the folder in your browser, and it will be found after the word “folders/IMTHEID”.



Save and run the code.


This code will generate another tab in our spreadsheet, and we can use the URL to import it into the image_1920 field in Odoo.


NOTE: This method is very effective, but it depends on the size and format of the image. Images that are not successfully uploaded can be manually loaded.

NOTE 2: For better data management, it is recommended that the image names contain the product name or internal reference.


Part 2: Importing into Odoo


Once the import file is ready (example image):



Go to your Odoo instance and navigate to the Inventory app - Products - Products (the path doesn’t matter; the import can be done in the product.template model).



In the list view and the Favorites section, select “Import Files” (for versions below 17.0).



In the list view and the action button, select “Import Files” (for versión upper 17.0).




• Upload the file and import.



3
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
"How to make rent movements for tracking inventory on projects " Resuelto
quickstart Quickstart qsmx Quickstar
Avatar
1
sept 25
920
How to dowload in bulk the attachments on my chatter and my product images? Resuelto
quickstart Quickstart qsmx Quickstar
Avatar
Avatar
2
sept 25
1171
How do I connect the Epson TM-T88VII to Odoo?
quickstart Quickstart
Avatar
Avatar
2
oct 25
880
How to Set Customer-Specific Product Names Resuelto
quickstart Quickstart
Avatar
1
ago 25
1360
✅ Odoo E-commerce: How to discriminate deliveries based on the type of clients
quickstart Quickstart
Avatar
0
ago 25
1401
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة 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

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

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