How to add image previews without using many2many or binary fields. i need to open the image when clicking on it
Tämä kysymys on merkitty
2
Vastaukset
5380
Näkymät
I am new to Odoo, can you tell me where to write these codes? Can I do this easily?
Hi,
Please try like below.
_inherit = ["image.mixin"]Then define a kanban view for image and add the below view for getting its preview.
_order = "sequence, id"
name = fields.Char("Name", required=True)
sequence = fields.Integer(default=10, index=True)
image_1920 = fields.Image(required=True)
related_document_id = fields.Many2one("your model", "Template", index=True, ondelete="cascade", invisible=True)
can_image_1024_be_zoomed = fields.Boolean(compute="_compute_can_image_1024_be_zoomed", store=True)
For getting the preview.
Regards
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
|
1
helmik. 24
|
2592 | ||
|
Embed PDF / image preview in form view
Ratkaistu
|
|
2
jouluk. 21
|
14991 | |
|
|
0
lokak. 20
|
5572 | ||
|
|
1
kesäk. 26
|
2363 | ||
|
|
1
huhtik. 26
|
2979 |