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

How to Properly copy views in odoo 8 ?

By
Sankar
on 7/14/15, 1:17 AM 1,090 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 ??

0

Solanki Shamji

--Solanki Shamji--
1293
| 5 2 6
Baroda, India
--Solanki Shamji--

Hello!

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" />
</tree>
</field>
</record>

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

<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"/>
</record>
     
    <menuitem action="res_group_action"
    id="menu_res_group"
    parent="define_parent_menu" sequence="10" />
0
Sankar
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

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