Odoo Help


How to modify css in OpenERP 7? [Closed]

on 5/3/13, 7:32 AM 7,252 views

The Question has been closed

on 05/03/2013 13:07:51

here is my requirement.i already created worker registration screen.its shows below

enter image description here

i need to change align and set EPF No field after Employer No field(with no label).

here shows my code in view.xml

<field name="employer_no" style="width: 30%%" />
<field name="epf_no" style="width: 30%%" class="bpl_worker_epf_no" />

i tried with css file.but its not affected to field.its just changed my field's label color.

.bpl_worker_epf_no {
    color: blue;
    top: 255px;
    left: 45px

please help me to sort out this issue.when i tried with nolabel="1" its messed up my layout and some fields arranged incorrect pattern.then please help me to sort this issue


Thank you this question is very help for me.@priyankahdp

Ankit H Gandhi(AHG)
on 5/11/15, 6:15 AM
Yug Faa
On 5/3/13, 9:13 AM

The solution is already implemented on v7.0

just use this :

<label for="employer_no" string="Employee No"/>
    <field name="employer_no" class="oe_inline" />
    <field name="epf_no" class="oe_inline" />

An other solution to force inline option of field is to set the withs of the both field. In this case :

<label for="employer_no" string="Employee No"/>

        <field name="employer_no" class="oe_inline" style="width: 47%"/>
        <field name="epf_no" class="oe_inline" style="width: 47%"/>

Remeber that the sum of width shouldn't over 100%, for me I prefer 94% (6% is mine)

Last solution is to split more the view, that mea that I can reserve 6 columns for the first side and 4 columns for the other side, example :

<group colspan="4" col="10">
  <group colspan="6">
    <label for="employer_no" string="Employee No"/>
        <field name="employer_no" class="oe_inline" />
        <field name="epf_no" class="oe_inline"/>
  <group colspan="4">

You can use also your class and set display block inline and nolabel for the field

Think to use the OpenERP predefined classes

I hope that this will help you.

but still those are in separate lines.below one's label was removed i need like state field in res_company form view

on 5/3/13, 9:44 AM

I update my answer, reply me if it works. good luck

Yug Faa
on 5/3/13, 12:35 PM

If you see that one of my solution work, don't forget to make the question resolved, best regards

Yug Faa
on 5/3/13, 12:44 PM

Wow Yug....You saved my whole day !!! thaks its works perfectly

on 5/3/13, 1:07 PM
samir Guesmi
On 5/3/13, 8:38 AM

you can modify , also in XML bloc , where defined your bloc with this structure .

thanks Samir,, please explain it with sample

on 5/3/13, 9:51 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 5/3/13, 7:32 AM
Seen: 7252 times
Last updated: 1/13/16, 11:35 PM