Skip to content
Snippets Groups Projects
account_consultation.xml 5.76 KiB
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- Views for the account consultation dialog. -->

    <record id="account_consultation_main" model="ir.ui.view">
        <field name="name">account_consultation_main</field>
        <field name="model">account.consultation</field>
        <field name="arch" type="xml">

            <form>

                <group name="account_selection_group" string="Account selection">
                    <group>
                        <field name="account_type_id" string="Type"
                            options="{'no_create': 1}" style="max-width: 200px;" />
                        <field name="account_id" options="{'no_create': True}"
                            style="max-width: 400px;" />
                    </group>
                </group>

                <group string="Transaction filters" col="6">

                    <group colspan="4">

                        <label for="period_from_id" string="Period: Filter" />
                        <div class="fieldblock">
                            <span> from</span>
                            <field name="period_from_id" widget="selection"
                                nolabel="1" class="oe_inline" />

                            <span> to</span>
                            <field name="period_to_id" widget="selection"
                                nolabel="1" class="oe_inline" />
                        </div>

                        <label for="due_date_from" string="Due date: Filter" />
                        <div class="fieldblock">
                            <span> from</span>
                            <field name="due_date_from" nolabel="1"
                                class="oe_inline" />

                            <span> to</span>
                            <field name="due_date_to" nolabel="1" class="oe_inline" />
                        </div>

                        <label for="ref_filter" string="Reference: Filter" />
                        <div class="fieldblock">
                            <span> from</span>
                            <field name="ref_from" nolabel="1" class="oe_inline" />

                            <span> to</span>
                            <field name="ref_to" nolabel="1" class="oe_inline" />
                        </div>

                    </group>

                    <group>

                        <field name="transaction_state" style="width: 100px;" />
                        <field name="include_reconciled" />

                    </group>

                </group>

                <group string="Matching references">
                    <label
                        string="No accounting entry could be found with the specified parameters."
                        attrs="{'invisible': [('matching_count', '!=', 0)]}"
                        colspan="2" />
                    <field name="matching_count" string="Matching entries"
                        attrs="{'invisible': [('matching_count', '=', 0)]}" />
                    <field name="norefs_matching_count" string="Matching entries without ref"
                        attrs="{'invisible': [('matching_count', '=', 0)]}" />
                    <div attrs="{'invisible': [('matching_count', '=', 0)]}"
                        colspan="2">
                        <field name="refs_matching_count" nolabel="1"
                            class="oe_inline" style="font-weight: bolder;" />
                        <span> </span> <!-- Non-breaking space. -->
                        <div
                            style="
                                    display: inline-block;
                                    margin-top: 2px;
                                    margin-right: 6px;
                                ">
                            references:
                        </div>
                        <field name="refs_matching" nolabel="1" class="oe_inline" />
                    </div>
                </group>

                <footer>

                    <button name="open_general_list" type="object" class="oe_highlight"
                        style="margin-right: 10px;">
                        <span>
                            <i class="fa fa-list" aria-hidden="true"></i>
                            Open the general list
                        </span>
                    </button>

                    <button name="open_analytic_list" type="object"
                        class="oe_highlight" style="margin-right: 10px;">
                        <span>
                            <i class="fa fa-list" aria-hidden="true"></i>
                            Open the analytic list
                        </span>
                    </button>

                    <button name="print_statement" type="object" class="oe_highlight"
                        style="margin-right: 10px;">
                        <span>
                            <i class="fa fa-file-text-o" aria-hidden="true"></i>
                            Print the statement
                        </span>
                    </button>

                    <button string="Close" special="cancel" class="oe_link" />

                </footer>

            </form>

        </field>
    </record>

    <!-- Add a menu command to launch the account consultation dialog. -->

    <record id="account_consultation_action" model="ir.actions.act_window">
        <field name="name">Account consultation</field>
        <field name="res_model">account.consultation</field>
        <field name="target">new</field>
        <field name="view_mode">form</field>
        <field name="view_type">form</field>
    </record>

    <menuitem id="account_consultation_menu_command" name="Account consultation"
        parent="account_report.account_consultation_sub_menu" sequence="1"
        action="account_consultation_action" />
</odoo>