Skip to Content
Menu
This question has been flagged
1 Odpoveď
4916 Zobrazenia

 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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
5
jún 20
6702
2
mar 15
6344
1
máj 24
2487
0
jan 24
2343
2
nov 23
7412