Odoo Help


How to put elements (tags like fields) in view after another element without any name or string?

Tomas Parnarauskas
on 7/19/13, 4:07 AM 1,197 views

Hello, I tried to ask this similar question in my previous post, but nothing seemed to understand what was I asking, so gave me answer not really related to what I was asking (or links given where to look didn't give me that answer). So I'll try to make this question more clear here. What I need is add my fields after element


It does not have any attributes like name, string etc. So I can't just give path like:

<group some_attribute="some_attribute_name" position=after>
<field name="my_field"/>

So is it possible to somehow position after that 'group' element when it does not have any attributes for system to know which 'group' element I mean? In leads/opportunities views there are many group elements without any attributes. So it's hard to position using it.

Also (if it is not possible to position after group without any attributes), maybe it is possible at least to just specify somehow that my fields will go just bellow every other fields in a view that I inherited?

Because now the only way I found to do something similar was to position my fields just after the last field in the inherited view. But then my all fields go to that last fields group, which I do not need.

Nishant Kashyap
On 7/19/13, 5:24 AM
Lets suppose you have the structure like this 

<form string='Job' version=7.0>
             <button name= ......../>
            <button name=......../>
                             <field name="field1"/>
                             <field name="field2"/>
                            <field name="field3"/>
                            <field name="field4"/>

Now you want to add a field or any group before the group 2 then you can use the xpath to choose the group second from the inherited view like this.

<xpath expr="/form/sheet/group/group[2]" position=before>
             <field name="XYZ" />

Thanks alot! It works very well.

NOD Baltic, UAB, Tomas Parnarauskas
on 7/19/13, 5:53 AM

My Pleasure sir ! :-)

Nishant Kashyap
on 7/19/13, 5:55 AM

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.


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

0 follower(s)


Asked: 7/19/13, 4:07 AM
Seen: 1197 times
Last updated: 3/16/15, 8:10 AM