<?xml version="1.0" encoding="utf-8"?>
<odoo>


    <record id="view_account_form_inherit_hierarchy" model="ir.ui.view">
        <field name="name">account.account.form.inherit.hierarchy</field>
        <field name="model">account.account</field>
        <field name="inherit_id" ref="account.view_account_form"/>
        <field name="arch" type="xml">

                <field name="account_type" position="after">
                    <field name="parent_id" context="{'show_view':True}"/>
                    <field name="level" required="1" readonly="0"/>
                    <field name="automticAccountsCodes" invisible="1"/>
                    <field name="auto_code" invisible="1"/>
                </field>

            <xpath expr="//div[contains(@class, 'col-md-auto')][label[@for='code']]" position="replace">
                <div class="col col-md-auto">
                    <label for="code" string="Code"/>
                    <div class="d-flex align-items-center">
                        <field name="automticAccountsCodes" invisible="1"/>
                        <field name="code"
                               placeholder="e.g. 101000"
                               class="oe_inline"
                               readonly="automticAccountsCodes"
                               force_save="1"
                               style="width: auto;"/>
                        <span class="badge text-bg-success ms-2"
                              invisible="not automticAccountsCodes"
                              title="Code is auto-generated">
                            Auto
                        </span>
                    </div>
                </div>
            </xpath>







        </field>
    </record>


<!--        <record id="view_account_form" model="ir.ui.view">-->
<!--            <field name="name">account.account.form</field>-->
<!--            <field name="model">account.account</field>-->
<!--            <field name="inherit_id" ref="account.view_account_form"/>-->
<!--            <field name="arch" type="xml">-->
<!--                <field name="account_type" position="after">-->
<!--                    <field name="parent_id" context="{'show_view':True}"/>-->
<!--                    <field name="level" required="1" readonly="0"/>-->
<!--                    <field name="automticAccountsCodes" invisible="1"/>-->
<!--                    <field name="auto_code" invisible="1"/>-->
<!--                </field>-->

<!--                <div class="oe_inline oe_edit_only" position="replace">-->
<!--                    <h1 class="oe_inline oe_edit_only">-->
<!--                        <field name="code" placeholder="code" force_save="1"-->
<!--                               attrs="{'readonly':[('automticAccountsCodes','=',True)]}"/> - -->
<!--                        <field name="name" placeholder="name"/>-->
<!--                    </h1>-->
<!--                </div>-->
<!--            </field>-->
<!--        </record>-->

    <record id="view_account_tree_inherit" model="ir.ui.view">
        <field name="name">account.account.tree.inherit</field>
        <field name="model">account.account</field>
        <field name="inherit_id" ref="account.view_account_list"/>
        <field name="arch" type="xml">
            <field name="code" position="after">
                <field name="parent_id" optional="hide"/>
            </field>
        </field>
    </record>

    <record id="view_account_search_inherit" model="ir.ui.view">
        <field name="name">account.account.search.inherit</field>
        <field name="model">account.account</field>
        <field name="inherit_id" ref="account.view_account_search"/>
        <field name="arch" type="xml">
                <field name="name" position="after">
                    <field name="account_type"/>
                    <field name="level"/>
                     <field name="parent_id"/>
                </field>

                <xpath expr="//searchpanel/field[@name='root_id']" position="replace">
                    <field name="parent_id"
                           string="Hierarchical Chart"
                           icon="fa-sitemap"
                           enable_counters="1"
                           expand="1"
                           hierarchize="1"/>
                </xpath>
        </field>
    </record>



<!--    <record id="account_report_form_inherit_hierarchy" model="ir.ui.view">-->
<!--        <field name="name">account.report.form.inherit.hierarchy</field>-->
<!--        <field name="model">account.report</field>-->
<!--        <field name="inherit_id" ref="odex30_account_reports.account_report_form"/>-->
<!--        <field name="arch" type="xml">-->

<!--            <xpath expr="//field[@name='root_report_id']" position="after">-->
<!--                <field name="filter_show_full_hierarchy"/>-->
<!--            </xpath>-->

<!--        </field>-->
<!--    </record>-->





<!--<record id="odex30_account_reports.trial_balance_report" model="account.report">-->
<!--    <field name="filter_full_hierarchy" eval="True"/>-->
<!--</record>-->



</odoo>
