Who would enjoy creating 100,000 product records, with images, one by one, in an ERP system? Even at a good rate of 4 every minute, you're looking at least 2 months of work.

That was the challenge faced by one of our customers when setting up their new ERP and website.

The product data itself could be loaded from a CSV or Excel import file. The problem was the images. Odoo didn't have the facility to upload images in bulk, but uploading each image manually was clearly not practical.

To solve this, we integrated Nextcloud which enabled Odoo to synchronise the images from the user's PC.

What is Nextcloud?

Nextcloud is an open source file share and collaboration platform. It's like having your own private version of OneDrive or Dropbox.

Files saved on your PC are uploaded to the cloud. Once they are uploaded, you can share them with others.

We're going to use Nextcloud to share files with Odoo.

We could have used an older technology like FTP. The advantage of Nextcloud is that synchronisation happens transparently in the background whenever a file is saved, and the client tells you when it's all done. If you close your laptop or move to a different network while it is uploading, it reconnects automatically and keeps going.

What this means is that you don't have to think about "doing the upload" - it just happens.

From a security perspective, Nextcloud can be hosted entirely within your own network. You don't need to open up external access, and your files are stored on infrastructure that you control.

How did we make it work with Odoo?

Odoo already has a file import routine which lets you create products in bulk by uploading an Excel or CSV file.

Using a spreadsheet like this is very efficient, because;

  • You can copy & paste repeated data
  • You can use formulas
  • There isn't a "submit" step after every record
  • You may already have some of the data in Excel format anyway, e.g. spec sheets and product lists from your suppliers
  • The file can be created offline and uploaded when it's ready

We extended Odoo's import function to add a "File" column. You just add the image filename into the spreadsheet, then Odoo handles retrieving the file from Nextcloud. It supports sub-folders as well, so you can organise product images into a logical directory structure.

When Odoo imports each image, it copies the file into its own data store. The version on Nextcloud is only used for transfer. This means that once the import is complete, the user can safely delete their folder of images. This saves space on their laptop, and also means they can't accidentally change something without logging into Odoo and uploading another spreadsheet.

Odoo can store images in the database, on the filesystem, or in external storage such as Amazon S3.

What was the user experience like?

With Nextcloud and Odoo integrated, users have a simple and straightforward process to create and update products in bulk.

Non-technical staff can use tools they are already familiar with (using Excel and dragging & dropping files) - they don't have to use anything technical or complicated.

The integration changed a 2-month process into a job that could be completed in a couple of days.