Skip to Content
Menu
This question has been flagged
1 Reply
2386 Views

Hi everyone,

I want to import around 20,000 leads in Odoo. Half of them have a logo.jpg, and I want to use it as a profile image. Leads though don't have a profile image field. 

How can I add this field or what else you advise me to do?

Thank you all in advace ! 


Avatar
Discard

Import all leads then make a script to import images to the related leads.

Best Answer

Hi John, 

You can create a new field for the image in leads and then add the images (as binary content) in the import sheet (ideally as CSV). Below are the steps which might be helpful for you.

Create new field:
Activate the Developer mode from Setting-> Activate Developer Mode
Go to the Leads module and edit any record
You will see a Bug icon on the right side of the Header menu
By clicking it, a list will be opened. Click the 'View Fields' option.
Create a new field like 'x_image_1920' and the field type will be 'binary'. It should have 'Stored', 'Copied', and 'Blacklisted' checkboxes as checked.
Copy the Field Name and then Save the field.
Again, click on the Bug icon and click on the 'Edit View Form' option.
XML view will be opened. Add the following line after the two widgets and before '

'.

Save the view and refresh your page.
Now, you'll be able to add images to Leads.

Import the Data:
Download sample data from leads and include the image field in it.
Check how it created binary. You need to add binary of your images the same way and then import it.

Please note that the side of the file will be increased and you might need to update the config of odoo/server or import the files in small parts.


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
195
1
Jul 23
982
1
Apr 23
6338
5
Nov 22
2028
0
Mar 22
1779