This question has been flagged
1 Reply
12114 Views

Hi,

I wrote the code:

 <group >

    <label for="remarks" string="Remarks"/>
        <div>     
            <field name="remarks" />
        </div>
 </group>

It appear like:

Remarks                              |_____________________________|<--------------text field

However, I would like to have:

Remarks  |___________________________________________|<--------------text field

How to achieve that?

Thank you very much.

Avatar
Discard
Author

Thanks for the method suggested by prakash. It works but the the field is now on the second page. Are there any amendments or commands to make it appear on the first page?

In my custom module version 7. I applied the same method its working without any issue.

Hi prakash,

Thanks for your email.

It's good that we can discuss through email because I can show you the results by figure. 

How can I find the email addresses of others in the forum?

I tried your code but it appears on the second page, as shown in the figure attached.

My desired result is that the whole "text + text box" appears at the line just below title with the text box shorten to fit the page.

I am now changing the form view of existing module, not creating new module.

Does it have any problems?

Also, you see that the address text box is very small, how can I enlarge its height?

Thank you very much.

Regards,

Frankie



On Fri, Jul 4, 2014 at 1:19 PM, prakash <prakash-jain-sunarctechnologies-com@openerp.my.openerp.com> wrote:

In my custom module version 7. I applied the same method its working without any issue.

--
prakash Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

Hi Frankie,

 1) I think you added "Remark" fields at the End of the </sheet> tag. so its shows in the next page (next sheet).  Add the "Remarks" after the  "Title" fields and  or In the page tag after the  "Internal Notes"  based on your need.

2) In your screen shot "Address" text box only shown. In the Openerp version 7 Customer form Address, City, State, Zip, Country text box also available. Check you settings to Enable all other fields.

Hope this will help you!

Thanks
Prakash




On Sat, Jul 5, 2014 at 8:13 AM, Frankie Chan <kwfchan@gmail.com> wrote:
Hi prakash,

Thanks for your email.

It's good that we can discuss through email because I can show you the results by figure. 

How can I find the email addresses of others in the forum?

I tried your code but it appears on the second page, as shown in the figure attached.

My desired result is that the whole "text + text box" appears at the line just below title with the text box shorten to fit the page.

I am now changing the form view of existing module, not creating new module.

Does it have any problems?

Also, you see that the address text box is very small, how can I enlarge its height?

Thank you very much.

Regards,

Frankie



On Fri, Jul 4, 2014 at 1:19 PM, prakash <prakash-jain-sunarctechnologies-com@openerp.my.openerp.com> wrote:

In my custom module version 7. I applied the same method its working without any issue.

--
prakash Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

--
Frankie Chan Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

Please review http://forum.openerp.com/forum/topic24602.html for help on colspan and cols.

Hi Ray,

Thanks.

I read it.

I wrote the code:

-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
    <record model="ir.ui.view" id="view_ct_form">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">

       <group >
             <label for="remarks" class="custom_allign" string="Remarks"/>
                <div>     
                    <field name="remarks" colspan = "4" />
                </div>
       </group>

    </record>
  </data>
</openerp>
-------------------------------------------------------------------------------------------------

However, the text box is too short. Can you please help?

Thanks.

Regards,

Frankie



On Sun, Jul 6, 2014 at 10:50 AM, Ray Carnes <rcarnes-ursainfosystems-com@openerp.my.openerp.com> wrote:

Please review http://forum.openerp.com/forum/topic24602.html for help on colspan and cols.

--
Ray Carnes Sent by OpenERP Inc. using OpenERP. Access your messages and documents in Odoo

Check where you are anchoring your <group> tag (right now you are not anchoring it anywhere that I can see), when I do it outside the main group, I get:

 

<img width="495" height="204" id="Picture_x0020_1" src="cid:image001.jpg@01CF99F9.A00A74E0">

 

 

You need an anchor field/group and postion=”before” or “after”.

 

Ray.

 

From: Frankie Chan [mailto:kwfchan@gmail.com]
Sent: Saturday, July 05, 2014 8:37 PM
To: Followers of column-span
Subject: Re: column span

 

Hi Ray,

 

Thanks.

 

I read it.

 

I wrote the code:

 

-------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>

<openerp>

  <data>

    <record model="ir.ui.view" id="view_ct_form">

        <field name="name">res.partner.form</field>

        <field name="model">res.partner</field>

        <field name="inherit_id" ref="base.view_partner_form" />

        <field name="arch" type="xml">

 

       <group >

             <label for="remarks" class="custom_allign" string="Remarks"/>

                <div>     

                    <field name="remarks" colspan = "4" />

                </div>

       </group>

 

    </record>

  </data>

</openerp>

-------------------------------------------------------------------------------------------------

 

However, the text box is too short. Can you please help?

 

Thanks.

 

Regards,

 

Frankie

 

 

On Sun, Jul 6, 2014 at 10:50 AM, Ray Carnes <rcarnes-ursainfosystems-com@openerp.my.openerp.com> wrote:

Please review http://forum.openerp.com/forum/topic24602.html for help on colspan and cols.

--
Ray Carnes Sent by OpenERP Inc. using OpenERP. Access your messages and documents in Odoo

 

--
Frankie Chan Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

Best Answer

In __openerp__.py File add:-

                "css" : ["static/src/css/labelallign.css"],

In static/src/css/labelallign.css add:-

                .openerp .custom_allign {
                            text-align: right;
                 }

In xml file add:-

<form string="Title" version="7.0">
 <group >
    <label for="remarks" class="custom_allign" string="Remarks"/>
        <div>     
            <field name="remarks" />
        </div>
 </group>
</form>

 

Avatar
Discard