Odoo Help


add & remove fields to inherited custom module

on 1/12/15, 2:40 PM 2,434 views

Iam try to add new fields to inherited custom module and hide a nother fields

1- I want remove "date_start" and "date_stop"

2- I want add "p_no"

this is my custom view code but it is not work :

<record model="ir.ui.view" id="custom_mrp_bom_tree_view">
                <field name="name">mrp.bom.tree.inherit</field>
                <field name="model">mrp.bom</field>
                <field name="type">tree</field>
                <field name="inherit_id" ref="mrp.mrp_bom_tree_view"/>
                <field name="arch" type="xml">
                    <tree string="BoM Structure">
                    <field name="date_start" position="replace"/>
                    <field name="date_stop" position="replace" />
                    <field name="routing_id" position="after">
                        <field name="p_no" />

On 1/12/15, 2:52 PM

Source record with id = "mrp.mrp_bom_tree_view" has model "mrp.bom.line". In your custom view model = "mrp.bom", this is wrong!

On 3/14/15, 11:48 PM

I use to hide some fields:

<xpath expr="//field[@name='field_name']" position="replace"></xpath>

and for add news fields: 

<xpath expr="//field[@name='field_name']" position="after">
      <field name="new_field"/>

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: 1/12/15, 2:40 PM
Seen: 2434 times
Last updated: 6/26/17, 11:52 AM