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

Length of a field

By
abin c ibrahim
on 1/20/15, 1:30 AM 1,908 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 ibrahim
on 1/20/15, 4:54 AM
2

Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
Tiny ERP Pvt Ltd
http://www.odoo.com
5975
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.

 

Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 

 

We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :

 

  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd.
On 1/20/15, 1:37 AM

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 ibrahim
on 1/20/15, 1:45 AM
project.password.form project.password
abin c ibrahim
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 ibrahim
on 1/20/15, 2:16 AM
project.password.form project.password
abin c ibrahim
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 ibrahim
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 ibrahim
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 ibrahim
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 ibrahim
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.

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

1 follower(s)

Stats

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