Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
8898 Näkymät

I'm trying to add o image widget in odoo screeen,

I have used the field as below ,

  image = fields.Binary("Image", attachment=True,
                          help="This field holds the image used as avatar for \
        this contact, limited to 1024x1024px",)

XML :

<field name="image" widget='image' class="oe_avatar"/>

The uploaded image has white space around image, how to upload image as it is , without adding white space around image ?

Avatar
Hylkää
Tekijä

I am stuck with this issue please anybody suggest me an idea

Paras vastaus

 image = fields.Binary("Image", help="This field holds the image used as avatar for \
        this contact, limited to 1024x1024px",)

Just try with these simple method. removing attachement.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
tammik. 23
2642
0
kesäk. 21
2580
1
toukok. 23
2850
1
helmik. 25
4312
1
huhtik. 19
10080