Skip to Content
Menu
This question has been flagged
1 Reply
3290 Views

As the tree has a hierarchical presentation of the analytic accounts, I would like to know how it is done please ?

Avatar
Discard
Best Answer

<record id="view_account_tree" model="ir.ui.view">

    <field name="name">account.account.tree</field>

    <field name="model">account.account</field>

    <field name="field_parent">child_id</field>

    <field name="arch" type="xml">

        <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >

            <field name="code"/>

            <field name="name"/>

            <field name="debit"/>

            <field name="credit"/>

            <field name="balance"/>

            <field name="company_currency_id"/>

            <field name="company_id" groups="base.group_multi_company"/>

            <field name="type"/>

            <field name="parent_id" invisible="1"/>

        </tree>

    </field>

</record>

<record id="action_account_tree" model="ir.actions.act_window">

    <field name="name">Chart of Accounts</field>

    <field name="res_model">account.account</field>

    <field name="view_type">tree</field>

    <field name="view_id" ref="view_account_tree"/>

    <field name="domain">[('parent_id','=',False)]</field>

</record>

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
3951
3
Jun 15
6796
6
Sep 17
6352
2
Mar 15
8367
1
Mar 15
3138