跳至内容
菜单
此问题已终结
1 回复
4631 查看

 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
形象
丢弃
最佳答案

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
形象
丢弃
相关帖文 回复 查看 活动
5
6月 20
6363
2
3月 15
6097
1
5月 24
2124
0
1月 24
2104
2
11月 23
7033