跳至内容
菜单
此问题已终结
3 回复
10252 查看

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?

形象
丢弃
最佳答案

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

Let me know if it help ....

形象
丢弃
最佳答案

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.

形象
丢弃
最佳答案

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"/>

形象
丢弃