Odoo Help

0

Length of a field

By
Abin C I
on 1/20/15, 1:30 AM 3,196 views

Hello,

How can i decrease the length of my field. Now it shown as a full row,,,

Eg:I hav a field to add age..but the field is too long...!!

Thanks in advance...

Here's my view code:

<record id="view_password" model="ir.ui.view">
            <field name="name">project.password.form</field>
            <field name="model">project.password</field>
            <field name="arch" type="xml">
                <form string="Password">
                   <group colspan="4">
                      <field name="name" colspan="2"/> 
                      <field name="password1"/>
                      <field name="password2"/>
                      <field name="password3"/>                
                  </group>                              
           <notebook>

post your full view code here.

Emipro Technologies Pvt. Ltd.
on 1/20/15, 1:57 AM

No1 Know This???

Abin C I
on 1/20/15, 4:54 AM
2

Try the following:

<group colspan="4">
    <field name="your_field" colspan="2">
    <label string="" colspan="2"/>
</group>

Hope this helps !!.

Thanks,But dsnt work fin...!

Abin C I
on 1/20/15, 1:45 AM
project.password.form project.password
Abin C I
on 1/20/15, 2:17 AM
0
Anand
On 1/20/15, 1:35 AM

use width attribute

<field name="myfield" width="200"/>

I tried as follows, But no changes..

aci aisha
on 1/20/15, 1:39 AM

use inside so that size may reduced..

Anand
on 1/20/15, 1:43 AM

hey are you using two accounts in forum....

Anand
on 1/20/15, 1:44 AM

dont use two accounts in forum....

Anand
on 1/20/15, 1:45 AM

post your full view code here.

Emipro Technologies Pvt. Ltd.
on 1/20/15, 1:56 AM
project.password.form project.password
Abin C I
on 1/20/15, 2:16 AM
project.password.form project.password
Abin C I
on 1/20/15, 2:16 AM
Demirel yakito
on 4/3/15, 6:17 AM
0
Nimesh
On 1/20/15, 1:35 AM

Hello Abin,

If you talkning about view then you can use <group>  tag in xml.

E.g :

<group>

    <group>

           <your field>

    </group>

    <group>

    </group>

</group>

 

 

Thanks,

Nimesh.

 

No nimesh, I asked about the width of a field...

Abin C I
on 1/20/15, 1:41 AM
-1
Demirel yakito
On 1/20/15, 2:04 AM

you can use char field.

<field name="name" style="width: 20%%" />  

it will works.

-1
Abin C I
On 1/20/15, 2:18 AM

        <record id="view_password" model="ir.ui.view">
            <field name="name">project.password.form</field>
            <field name="model">project.password</field>
            <field name="arch" type="xml">
                <form string="Password">
                   <group colspan="4">
                      <field name="name" colspan="2"/> 
                      <field name="password1"/>
                      <field name="password2"/>
                      <field name="password3"/>                
                  </group>                              
           <notebook>

which of these field is getting too long? By default a field is of colspan="2". Are you on v8 or v7?

Emipro Technologies Pvt. Ltd.
on 1/20/15, 2:28 AM

where is ur age field.? which field u want to reduce the size of length

Demirel yakito
on 1/20/15, 2:32 AM

you can use char field. change in ur py file. age=fields.Char(size=3) it will works.

Demirel yakito
on 1/20/15, 2:34 AM

Empiro, im on v8.. All f my fields are lengthy

Abin C I
on 1/20/15, 4:23 AM

Ram, Cant use size here,why bcz i want to resize my field with many2one fnc..size is cause error there..

Abin C I
on 1/20/15, 4:30 AM
-1
Mitesh Savani (msa)
On 1/20/15, 2:36 AM

Hello abin,

Use class="oe_inline" it will not shown as a full row.

And for more shorter u can give fix size from field declaration

eg. 'age': fields.char('age',size=3,required=True),

Thanks.

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.

Register

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

1 follower(s)

Stats

Asked: 1/20/15, 1:30 AM
Seen: 3196 times
Last updated: 4/3/15, 6:18 AM