To add a new field to a form in XML you just type:
<record model="ir.ui.view" id="sale_margin_percent_3">
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="after">
<field name="sale_margin_percent" groups="base.group_user"/>
which would add "sale_margin_percent" field after "price_unit" in "order_line".
So far, so good.
However, what would you need to add to specify that the new field has a given "on_change" attribute?
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
|Asked: 7/25/15, 11:19 AM|
|Seen: 414 times|
|Last updated: 7/25/15, 1:13 PM|