تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
10136 أدوات العرض

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

الصورة الرمزية
إهمال