c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #01102
[Bug 455547] Re: Using position="after" in inherited view adds the fields in reverse order
Hello NIcolas,
We really appreciate your efforts. I have found an optimized solution
for the problem. Here are the patches for stable and trunk both. With
your patch the problem was only that if we need to add a field between
two previously existing fields then it won't work. So would you please
check the attached patch and give your views.
Thanks.
--
Using position="after" in inherited view adds the fields in reverse order
https://bugs.launchpad.net/bugs/455547
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Server: In Progress
Status in OpenObject Server 5.0 series: In Progress
Status in OpenObject Server trunk series: In Progress
Bug description:
Applies to 5.0.6
For example, if I use the following 'arch' XML in an inherited view:
<field name="arch" type="xml">
<field name="my_field" position="after">
<field name="field1" />
<field name="field2" />
<field name="field3" />
<field name="field4" />
</field>
</field>
The resulting screen will display the fields in the following order:
my_field
field4
field3
field2
field1
My guess is that the server is calling the 'insert after' xml method for each sub-tag in order.
The fix will be to call the 'insert after' xml method for each of the sub-tags in reverse order, so that field1 is inserted last, so it appears directly after my_field
I will use the position="replace" method as a workaround for now.