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

Text after the field in a form

By
Alex
on 5/16/15, 10:01 AM 877 views

Hello,

How can I add a text after the field in a group?

The text should remain in the line itself:

 <group>
                            <field name="x_KundeHatBestelltUndGekauft" />
                            <field name="x_Brand" > My text 1
                            <field name="x_Brand2" > My text 2
                            <field name="x_Brand3" 
                            <field name="x_Brand4" >
                            <field name="x_Brand5" >
 </group>

Thanks in advance!

Hello Temur, Thanks for the feedback. That brought me even further, but the distance is too big for the column. If you have other options to deposit the text directly after the field? Thanks in advance!

Alex
on 5/16/15, 6:55 PM
0

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 5/16/15, 10:43 AM


what about label?


 <group col="3">
        <field name="x_KundeHatBestelltUndGekauft" /> <label string="" nolabel="1" />
        <field name="x_Brand" /> <label  string="My text 1" nolabel="1" />
        <field name="x_Brand2" /> <label string="My text 2" nolabel="1" />
</group>


-also there is another option for first field(x_KundeHatBestelltUndGekauft), you can use  colspan="3" instead of empty label, because we made <group> width 3 with col="3" and as we haven't label for first field, it'll fit correctly group width with colspan="3"

        <field name="x_KundeHatBestelltUndGekauft" colspan="3"/> 


UPDATE:

for your issue of distance, you can manipulate column count in group tag and simultaneously use colspan property in fields/labels. take in account that "field" need 2 column space by default. so for each line (for each field & label couple) you'll need to have sum of columns equal to col property of wrapper group tag. for example change above group as follows:


<group col="6">
<field name="x_KundeHatBestelltUndGekauft" /> <label string="" nolabel="1" colspan="4" />
<field name="x_Brand" /> <label string="My text 1" nolabel="1"  colspan="4" />
<field name="x_Brand2" /> <label string="My text 2" nolabel="1" colspan="4" />
</group>


fields width 2  +  label width (with colspan) 4 fits exactly group width 6.

you can use different numbers, adapt it to your requirements.

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

2 follower(s)

Stats

Asked: 5/16/15, 10:01 AM
Seen: 877 times
Last updated: 5/19/15, 7:10 AM