How to upload image in custom window in form view while creating new record and viewing the image after the saving record ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
In Python create Image field:-
_name = "table.name"
_columns = {
'image': fields.binary("Image",help="This field holds the image"),
}
In XML Form view define:-
<field name="image" widget="image" />
Hi,
Please i want to know How i can save the image in the database?
Thanks!
you can use option atribute for custom preview of the image.
<field name="image" widget='image' options="{'preview_image': 'image_small', 'size': [30, 30]}"/>
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire