0
votes

I created a form which inherits from other form. I added and changed several fields and attributes, but now, I need to modify a tag which is not a field. This is the line in the original form:

<a type="open"><field name="name"/></a>

And I want it to be the next one:

<a type="object" name="my_function"><field name="name"/></a>

Anyone knows how to manage this? By the way, that field is inside a page (you can check it, activate debug mode on the OpenERP interface, go to the standard view of a partner which is a company, and click editFormView -debug mode-, Control+F and type the line, there is only one like that).

2

2 Answers

1
votes

Use an xpath with position="attributes" rather than before/after etc.

Just search the source tree for "attributes" in the XML and you will find examples. My memory is faulty so it may be position="attribute" but you will find examples.

0
votes

Done! I was not able to manage this through position="attributes", so I had to use position="replace" to do it, in the following way:

<xpath expr="/form//notebook//page//a[@type='open']//field[@name='name']" position="replace"/>
    <a type='object' name='open_line'><field name="name"/></a>
</xpath>