Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to include classes in views?

By
Praveen S
on 7/14/13, 7:15 AM 1,646 views

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?

3
Abhishek
On 7/14/13, 3:32 PM

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

Let me know if it help ....

0
lyzoyu
On 3/5/14, 11:53 AM

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

0

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 7/14/13, 9:37 PM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/14/13, 7:15 AM
Seen: 1646 times
Last updated: 3/16/15, 8:10 AM