How to add image previews without using many2many or binary fields. i need to open the image when clicking on it
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
2
Odpowiedzi
3985
Widoki
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
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
lut 24
|
1268 | ||
Embed PDF / image preview in form view
Rozwiązane
|
|
2
gru 21
|
12960 | |
|
0
paź 20
|
4186 | ||
|
1
lip 25
|
2432 | ||
|
2
lip 25
|
7898 |