Image Batch Upload - odoo-ps/pshk-process GitHub Wiki
Image Batch Upload
TLDR
-
Image Batch Upload by Yourself
- If you want to use the old
Images URL Generator
, here is the reason we don't support them - The
Images URL Generator
is developed by the BE team so we don't have access to maintain it. If you want to use it still but it doesn't work, you need to contact the owner from BE by yourself to fix it.
- If you want to use the old
-
Image Batch Upload by Client
- If your client want to develop by themselves and ask for a training session
- Create a task and put it under
Help and Training
- We will teach the client to use a open source project
-
Image Batch Upload by Tech Team
- If you want to ask for tech team to help batch uploading image.
- Create a task and put it under
Help and Training
- And follow the below procedure to setup the folder for image upload
Image Batch Upload by Tech Team
- Reference: Link
Currently, we provide two options for setting up the image upload data.
- Google Drive
- Url
Option 1: Google Drive
Scenario: Import image to product (Reference: product.template.csv)
- Export xmlid from the system with the product you want to import the image
- Create a spreadsheet with column id, image_1920 (Include extra if you want to add extra image)
- id: the xmlid of the record
- image_1920: folder name + image file name
- For example, you have an image image.png and put it under main folder, the image_1920 data will be main/image.png
- Do not include other fields column as the system will update the column data as well
- Prepare the image in the corresponding folder
- Grant us permission to access to the folder
P.S. If you want to import image to product.product, you should use product.product xmlid and the file name should be product.product.csv
Option 2): Url
Sometimes we don't want to download all the images and the clients happened to provide the list of the image url
Scenario: Create attachment under corresponding resources models (Reference: ir.attachment.csv)
- Prepare the image url list
- Create a csv with column name, res_model, res_id, datas
- name: whatever name is okay, or can ask the tech to scrap the name from the file
- res_model: model to attached to, can refer to ir.attachment.csv for the format
- res_id: id of the record to attached to
- datas: url of the image
- Send us the csv so we could proceed
Additional for Odoo.sh
- We also require the API key in order to update the image to production and staging. You could refer to the image below on how to create an API key and ask the client to create one.
- Send the API key to TC in private chat (Discord message, etc.)
- Remove the API key once the upload is done.