Odoo Help


How to Properly copy views in odoo 8 ?

on 7/14/15, 1:17 AM 1,872 views

How to properly copy view in odoo 8. lets say, i want to list User Group lists in my custom module.

So far i have inherited res.groups also inherited base.res_groups_form .

Result is i have customized list of groups in my module. but also it is changed in original Menu too.

Lets i want 2 view for groups or any other things in odoo. one is original and another is my module view. is it possible.?

i think it is possible in _inherits but i hve to copy whole view code. how to do it ??


Solanki Shamji

--Solanki Shamji--

| 5 2 7
Baroda, India
--Solanki Shamji--


Solanki Shamji
On 7/14/15, 1:55 AM

For this you ca make one tree view for your menu and give reference in your action.

May be this will solved your purpose.

      <!-- define field which you want to display. -->
<record id="your_res_group_tree_view" model="ir.ui.view">
<field name="name">res.group.tree</field>
<field name="model">res.group</field>
<field name="arch" type="xml">
<tree string="Product Sequence">
<field name="name"/>
<field name="xyz" />
<field name="abc" />

<record id="res_group_action" model="ir.actions.act_window">
<field name="name">Res Group</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.group</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="view_id" ref="your_res_group_tree_view"/>

<record id="action_group_form" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="give_your_form_view_id/>
<field name="act_window_id" ref="res_group_action"/>
    <menuitem action="res_group_action"
    parent="define_parent_menu" sequence="10" />
On 7/14/15, 2:00 AM

Thanks for your reply . . it works .
previously i did that only.

I edited the answer code. May be this will help you.

Solanki Shamji
on 7/14/15, 2:44 AM

Hello, make another form view same like a tree view and give reference.

Solanki Shamji
on 7/14/15, 3:33 AM

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: 7/14/15, 1:17 AM
Seen: 1872 times
Last updated: 10/28/15, 10:20 AM