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.

3

How to modify css in OpenERP 7? [Closed]

By
priyankahdp
on 5/3/13, 7:32 AM 6,055 views

The Question has been closed

by
priyankahdp
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

thanks

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

Ankit H Gandhi(AHG)
on 5/11/15, 6:15 AM
4
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"/>
<div>
    <field name="employer_no" class="oe_inline" />
    <field name="epf_no" class="oe_inline" />
</div>

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

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

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"/>
    <div>
        <field name="employer_no" class="oe_inline" />
        <field name="epf_no" class="oe_inline"/>
    </div>
  </group>
  <group colspan="4">
  ...
  </group>
</group>

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

priyankahdp
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

priyankahdp
on 5/3/13, 1:07 PM
1
samir
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

priyankahdp
on 5/3/13, 9:51 AM

About This Community

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

Question tools

2 follower(s)

Stats

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