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
- Contabilidad
- Inventario
- PoS
- Proyecto
- MRP
Se marcó esta pregunta
1
Responder
1031
Vistas
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>
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse