Skip to Content
Menu
This question has been flagged
1 Reply
3639 Views

 I have seen in sale_view.xml 

<record model="ir.ui.view" id="view_sale_order_graph">    
<field name="name">sale.order.graph</field>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<graph string="Sales Orders">
<field name="partner_id"/>
<field name="amount_total" type="measure"/>
 </graph>
</field></record>
I need to do the same thing inspite of <graph></graph>there should be <myelement></myelement>.Thank you
Avatar
Discard
Best Answer

u can inherit that view like :

<record model="ir.ui.view" id="view_sale_order_graph_inherit">
    <field name="name">sale.order.graph.inherit</field>
     <field name="model">sale.order</field>
     <field name="inherit_id" ref="sale.view_sale_order_graph"
     <field name="arch" type="xml">
         <xpath expr="/graph" position="inside">
             <yourelement>
             </yourelement>
         </xpath>
     </field>
     

 
dont forget to depend ur module to sale and xml view in __openerp__.py
Avatar
Discard
Related Posts Replies Views Activity
5
Jun 20
4982
2
Mar 15
5148
1
May 24
754
0
Jan 24
1076
2
Nov 23
5919