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.

1

How to create a tree view in openerp (odoo) in v8?

By
manuthalasseril
on 7/30/15, 5:28 AM 603 views

I create a module which contains form,tree view, actions, and menu. But my tree view is not showing and also there is no more errors. My code was given below.

<record model="ir.ui.view" id="enquiry_form_view_leads">
<field name="name">Enquiry - Leads Form</field>
<field name="model">enquiry.lead</field>
<field name="arch" type="xml">
<form string="Enquiry Leads Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" />
<h1>
<field name="name" placeholder="Describe the lead..." />
</h1>
</div> .....
</sheet>
</form>
</field>
</record> <!-- is working well -->
<!-- Enquiry Lead Tree View is not working-->
<record model="ir.ui.view" id="enquiry_tree_view_leads">
<field name="name">Enquiry Leads</field>
<field name="model">enquiry.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Enquiry Leads">
<field name="create_date"/>
<field name="name"/>
<field name="contact_name"/>
<field name="country_id"/>
<field name="email_from"/>
<field name="phone"/>
</tree>
</field>
</record> <!-- is not working -->
<record model="ir.actions.act_window" id="enquiry_case_leads_all">
<field name="name">Enquiry Leads</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">enquiry.lead</field>
<field name="view_type">form</field>
<field name="view_id" ref="enquiry_tree_view_leads"/>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p>
Enquiry leads from website contact us form
</p>
</field>
</record> <!-- is working well -->
<menuitem name="Enquiry Leads" id="menu_enquiry_leads" parent="base.menu_sales" sequence="0"
action="enquiry_case_leads_all"/> <!-- is working well -->

All other views actions are working well except my tree view. Please help me..

3
Indrabhan Bhamare
On 7/30/15, 10:31 AM

hello

There is no error in tree view

but still for you I have made little change in your tree view you can try this

<record model="ir.ui.view" id="enquiry_tree_view_leads">
<field name="name">view.enquiry.leads.tree</field>
<field name="model">enquiry.leads</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Enquiry Leads">
<field name="create_date"/>
<field name="name"/>
<field name="contact_name"/>
<field name="country_id"/>
<field name="email_from"/>
<field name="phone"/>
</tree>
</field>
</record>

0

Hiral Patel (hip)

--Hiral Patel (hip)--
Tiny ERP Pvt Ltd
http://www.odoo.com
913
| 2 1 5
India
--Hiral Patel (hip)--


Hiral Patel (hip)
On 7/31/15, 12:56 AM

Remove this line:

<field name="type">tree</field>
0

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
996
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 7/30/15, 7:09 AM

Dear Manuthalasseril,

Your code is working good I tired it. there is no any error for tree view

Just create one record from your side aftre tree view will show

Regards,

Ankit H Gandhi

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/30/15, 5:28 AM
Seen: 603 times
Last updated: 7/31/15, 12:56 AM