Odoo Help


how to create new "Xml Element" in Odoo?

on 4/14/16, 5:51 PM 626 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"/>
I need to do the same thing inspite of <graph></graph>there should be <myelement></myelement>.Thank you
Dion Martin
On 4/15/16, 12:48 AM

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">

dont forget to depend ur module to sale and xml view in __openerp__.py

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/14/16, 5:51 PM
Seen: 626 times
Last updated: 4/15/16, 12:48 AM