Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
10241 Vizualizări

hi, in my view their is an image field. so i copied it form res.partneras like below.

 <field name="image" widget='image' class="oe_left oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/>

it generates an error.

but when i am using the code with no class as like below

 <field name="image" widget='image' options='{"preview_image": "image_medium", "size": [90, 90]}'/>

it will not generates any error. what is the difference and how to include that class to may view?

Imagine profil
Abandonează
Cel mai bun răspuns

use only this ...... <field name="image" widget="image" class="oe_left oe_avatar"/>

Let me know if it help ....

Imagine profil
Abandonează
Cel mai bun răspuns

It will not generate any error because tag class allows you to set the position and other data on the image field. For example if you set oe_right it's going to appear on the right side. It depends on containers and other data to work.

Everything is set by the css files, it's not going to affect the funcionality it's just helping you to have a nice form view.

Imagine profil
Abandonează
Cel mai bun răspuns

Make sure the version is 7.0, just like this: <form string="Employee" version="7.0"> <sheet> <field name="image_medium" widget="image" class="oe_left oe_avatar"/>

Imagine profil
Abandonează