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

Tree Structure : field_parent

By
Silviaa
on 1/20/14, 4:13 AM 956 views

Im trying to display the Purchase and Purchase Order Line in Tree structure. When I click on PO Tree structure i need the below Format

PO1
 PO1Line1
 Po1line2
PO2
 PO2Line1

Tried the Below Code but failed to display the POLine details :

 <record id="view_purchase_list" model="ir.ui.view">
        <field name="name">purchase.order.tree</field>
        <field name="model">purchase.order</field>
         <field name="type">tree</field>
         <field name="field_parent">order_line</field>
        <field name="arch" type="xml">
            <tree fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="purchase_form_action">
                <field name="message_unread" invisible="1"/>
                <field icon="icon" name="name" string="Reference"/>
                <field name="date_order" />
                <field name="partner_id"/>
                <field name="origin"/>
                <field name="amount_total" sum="Total amount"/>
                <field name="state"/>
                <field name="product_id" invisible="1"/>
            </tree>
        </field>
 </record>

 <record id="action_purchase_list" model="ir.actions.act_window">
    <field name="name">PO Tree Structure</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">purchase.order</field>
    <field name="view_type">tree</field>
    <field name="view_id" ref="view_purchase_list"/>
    <field name="domain">[('state','in',('draft','sent','confirmed'))]</field>
    <field name="search_view_id" ref="view_purchase_order_filter"/>
 </record>

 <menuitem action="action_purchase_list" id="menu_purchase_list"
        parent="menu_procurement_management"
        sequence="0"/>

Any advice will be helpful

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

0 follower(s)

Stats

Asked: 1/20/14, 4:13 AM
Seen: 956 times
Last updated: 3/16/15, 8:10 AM