Hi everybody
I want to extend the project module and make a new menu item that shows the project.project data in a listview but with other fields.
The default project listview looks like this:
http://i.imgur.com/II0O8PW.png
I now want to create a second menu item that also shows a listview but with other field names. It should show me the name and some of my custom fields (such as x_internal_ip and x_external_ip).
How exactly should I do this? I've coded the second menu-item and the view but if I change the fields in the arch of project.project it reflects on both the project.project views that I now have.
My custom code:
<!--CUSTOM-->
<record id="project_detail_tree" model="ir.ui.view">
<field name="name">Details</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<tree string="Details">
<field name="x_name"/>
<field name="x_number"/>
<field name="x_vm_name"/>
<field name="x_internal_ip"/>
<field name="x_external_ip"/>
<field name="x_port"/>
</tree>
</field>
</record><record model="ir.ui.view" id="course_search_view">
<field name="name">project.project.search</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
</search>
</field>
</record><record model="ir.actions.act_window" id="project_course_action">
<field name="name">Details overview</field>
<field name="res_model">project.project</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
</search>
</field>
</record><menuitem id="detail_menu" name="Details specifications" parent="base.menu_main_pm" />
<menuitem id="project_details_menu" name="Details configuration" parent="detail_menu" action="project_course_action" />
The thing is that my code from project.project.tree is combined with the code of the default project.project tree code there is, which looks like this:
<record id="view_project" model="ir.ui.view">
<field name="name">project.project.tree</field>
<field name="model">project.project</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree fonts="bold:message_unread==True" colors="red:date and (date<current_date) and (state == 'open');blue:state in ('draft','pending');grey: state in ('close','cancelled')" string="Projects">
<field name="sequence" widget="handle"/>
<field name="message_unread" invisible="1"/>
<field name="date" invisible="1"/>
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Contact"/>
<field name="parent_id" string="Parent" invisible="1"/>
<field name="planned_hours" widget="float_time"/>
<field name="total_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="progress_rate" widget="progressbar"/>
<field name="state"/>
</tree>
</field>
</record>
What is the solution to make a second view with data from project.project in a second tree view?
Thanks
Yenthe