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

    <record id="view_move_form_inherit" model="ir.ui.view">
        <field name="name">account.move.form.inherit</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form"/>
        <field name="arch" type="xml">
            <xpath expr="//div[@name='button_box']" position="inside">
                <button class="oe_stat_button" name="open_commissions" icon="fa-money" type="object"
                        attrs="{'invisible': [('commission_count', '=', 0)]}">
                    <field name="commission_count" string="Commissions" widget="statinfo"/>
                </button>
            </xpath>
        </field>
    </record>

    <record id="view_account_journal_form_misc_account" model="ir.ui.view">
        <field name="name">account.journal.form.inherit</field>
        <field name="model">account.journal</field>
        <field name="inherit_id" ref="account.view_account_journal_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='default_account_type']" position="after">
                <field name="default_account_id" string="Default Account" attrs="{'invisible': [('type', '!=', 'general')]}" groups="account.group_account_readonly"/>
            </xpath>
        </field>
    </record>

</odoo>