What do i need to do besides defining a customized view for a user (under user interface) to get that user to see it instead of the original one?
I need to remove many fields and add 2 new ones on that view.
Or should i do it inheriting a view? That way, i know how to add fields, but not remove them.
I hope that the best way is to inherit the view.
To replace the field, use the following code example...
<record model="ir.ui.view" id="view_partner_form2">
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="Field1_name_to_replace" position="replace"/>
<field name="Field2_name_to_replace" position="replace"/>
<Code to add the fields>
In the above Code,
<field name="X" position="replace"/> remove the X from view.
For more details please refer the https://doc.odoo.com/6.0/developer/2_6_views_events/views/view_inheritence/
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
|Asked: 11/3/14, 8:21 AM|
|Seen: 1323 times|
|Last updated: 3/16/15, 8:10 AM|