Odoo Help


Inherit a predefined view.

Hussain Nagri
on 12/15/13, 5:06 AM 3,210 views

I am new to OpenERP and trying to understand it, What I am trying to do is that I create a new Module and then on that module I call a view of sale_order, but I want to customize the view the way I want. Lets say the default view shows five coloumns and I want only two out of those five coloumns to be displayed. I tried some coding but it shows the default view. Here is my code.


<?xml version="1.0" encoding="UTF-8"?>

        <menuitem name="Genrate Dictonary" id="menu_sale_order_duplicate1" />

        <record id="sale_order_duplicate_tree1" model="ir.ui.view">
        <field name="naame">sale.order.tree.inherit</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_quotation_tree" />
        <field name="arch" type="xml">

                    <field name="date_order"/>
                    <field name="partner_id"/>
                    <field name="user_id"/>

        <record model="ir.actions.act_window" id="action_sale_order_duplicate1">
            <field name="name">Sale Order Duplicate</field>
            <field name="res_model">sale.order</field>
            <field name="view_id" ref="sale_order_duplicate_tree1"/>

        <menuitem name="Duplicate" id="menu_sale_order_duplicate_submenu1" parent="menu_sale_order_duplicate1"/>
        <menuitem name="Sale Order Duplicate" id="menu_sale_order_sub_sub_menu1"
            parent="menu_sale_order_duplicate_submenu1" action="action_sale_order_duplicate1" />


from openerp.osv import fields,osv
from openerp.addons.fleet.fleet import fleet_vehicle
from openerp.osv.fields import _column

class sale_order_duplicate(osv.osv):
    _inherit = 'sale.order'
    _description = "Sales Order"
    _columns = {



Can someone please tell me what else should I do and how this thing actually works. Thank you.

André Schenkels
On 12/15/13, 5:24 PM

You can take a look at the technical information provided by OpenERP itself. www.openerp.com/files/memento/OpenERP_Technical_Memento_latest.pdf

When you do an inherit of the view you should do a field replace/after/before or use xpath.

André Schenkels www.schenkels.nl

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: 12/15/13, 5:06 AM
Seen: 3210 times
Last updated: 3/16/15, 8:10 AM