Hi,
How to upload an image as an attachment inside the form like the way we add a field.
Regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
How to upload an image as an attachment inside the form like the way we add a field.
Regards
Hi,
You can add the attachment by using a binary field.
Eg 1:
Python
company_favicon = fields.Binary("Favicon", attachment=True, |
Xml
<field name="company_favicon" |
Eg 2: (You can add Multiple attachments and download)
Python
image = fields.Many2many('ir.attachment', string="Image") |
Xml
<field name="image" widget="many2many_binary"/> |
Thank you.
Thanks but i can't download it again, any solution ?
Hai medmars,
I just update my answer. check it. I think it will help you.
Thank you
Thanks So much Avinash it work perferctly.
Hi,
It's me again :)
following the 2nd Eg, i added two attachment fields in my form, but when i fill out just one field the other attachment field take the same picture. So i can't add different attachements in this two fields
Any suggestion.( i want to fill the 1st attachment by an ID card and the second by a picture)
Thanks
I Try this code, but when i click save button it doesn't show image
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up