Odoo Help

Welcome!

This community 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.

0

add & remove fields to inherited custom module

By
mohammed
on 1/12/15, 2:40 PM 1,638 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" />
                    </field>
                    </tree>   
                </field>
        </record>

0

michel Guénard

--michel Guénard--
1033
| 5 5 8
VIROFLAY, France
--michel Guénard--

VP operations & finance Social entrepreneur Certified Public Accountant Past Chief internal auditor

michel Guénard
On 3/14/15, 7:34 PM
0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
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!

0
Algode
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"/>
</xpath>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/12/15, 2:40 PM
Seen: 1638 times
Last updated: 3/16/15, 8:10 AM