how to add an image to a many2one field other than EHCS Many2one Dropdown Image
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
1015
Views
Assuming you have a model named YourModel with a Many2one field named related_field and you want to display an image associated with each record selected in the related_field
in py:
image_field = fields.Binary(string="Image", attachment=True)
in xml:
div>
field name="image_field" widget="image" options='{"preview_image": "image_field"}'/>
/div>
/group>
/sheet>
/form>
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up