<?xml version="1.0"?>
<form string="Account Journal">
                    <field name="company_id" invisible="1"/>
                    <field name="bank_statements_source" invisible="1"/>
                    <sheet>
                        <div name="button_box" class="oe_button_box">
                            <button class="oe_stat_button" type="action" name="299" icon="fa-book" context="{'search_default_journal_id':id}">
                                    <div class="o_stat_info">
                                        <span class="o_stat_text">Journal Entries</span>
                                    </div>
                            </button>
                        </div>
                        <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
                        <div class="oe_title">
                            <label for="name"/>
                            <field name="name_placeholder" invisible="1" force_save="1"/>
                            <h1><field name="name" options="{'placeholder_field': 'name_placeholder'}" required="not type"/></h1>
                        </div>
                        <group>
                            <group>
                                <field name="active" invisible="1"/>
                                <field name="type"/>
                                <field name="code" placeholder="e.g. INV"/>
                            </group>
                            <group>
                                <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
                                <field name="country_code" invisible="1"/>
                            </group>
                        </group>
                        <notebook>
                            <page name="bank_account" string="Journal Entries">
                                <group>
                                    <group>
                                        <field name="default_account_type" invisible="1"/>
                                        <label for="default_account_id" string="Bank Account" invisible="type != 'bank'" groups="account.group_account_readonly"/>
                                        <label for="default_account_id" string="Journal Account" invisible="type != 'credit'" groups="account.group_account_readonly"/>
                                        <label for="default_account_id" string="Cash Account" invisible="type != 'cash'" groups="account.group_account_readonly"/>
                                        <label for="default_account_id" string="Default Income Account" invisible="type != 'sale'" groups="account.group_account_readonly"/>
                                        <label for="default_account_id" string="Default Expense Account" invisible="type != 'purchase'" groups="account.group_account_readonly"/>
                                        <label for="default_account_id" string="Default Account" help="If set, this account is used to automatically balance entries." invisible="type != 'general'" groups="account.group_account_readonly"/>
                                        <field name="default_account_id" nolabel="1" placeholder="Create new account" invisible="not type or type in ('sale', 'purchase', 'general')" required="(id and type in ('bank', 'cash', 'credit'))" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                        <field name="default_account_id" nolabel="1" invisible="type not in ('sale', 'purchase', 'general')" required="type in ('sale', 'purchase')" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                        <field name="suspense_account_id" invisible="type not in ('bank', 'cash', 'credit')" required="type in ('bank', 'cash', 'credit')" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                        <field name="non_deductible_account_id" invisible="type != 'purchase'" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                        <field name="profit_account_id" invisible="type not in ('cash', 'bank')" groups="account.group_account_readonly"/>
                                        <field name="loss_account_id" invisible="type not in ('cash', 'bank')" groups="account.group_account_readonly"/>
                                        <field name="refund_sequence" invisible="type not in ['sale', 'purchase']"/>
                                        <field name="payment_sequence" invisible="type not in ('bank', 'cash', 'credit')"/>
                                        <field name="invoice_template_pdf_report_id" invisible="not display_invoice_template_pdf_report_id" options="{'no_create': True, 'no_edit': True}"/>
                                        <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
                                    </group>
                                    <group name="bank_account_number" invisible="type != 'bank'">
                                        <field name="company_partner_id" invisible="1"/>
                                        <field name="bank_account_id" string="Bank Account Number" context="{'default_partner_id': company_partner_id}"/>
                                        <field name="bank_id" invisible="not bank_account_id"/>
                                        <field name="bank_statements_source" widget="radio" required="type == 'bank'" groups="account.group_account_basic"/>
                                    </group>
                                    <group name="bank_source" invisible="type != 'credit'">
                                        <label for="bank_statements_source" string="Transaction Feeds" invisible="type != 'credit'" groups="account.group_account_readonly"/>
                                        <field name="bank_statements_source" nolabel="1" widget="radio" required="type == 'credit'" groups="account.group_account_basic"/>
                                    </group>
                                </group>
                            </page>
                            <page id="inbound_payment_settings" string="Incoming Payments" name="page_incoming_payments" invisible="type not in ['cash', 'bank', 'credit']">
                                <field name="available_payment_method_ids" invisible="1"/>
                                <field name="inbound_payment_method_line_ids" nolabel="1" context="{'default_payment_type': 'inbound'}">
                                    <list string="Payment Methods" editable="bottom">
                                        <field name="available_payment_method_ids" column_invisible="True"/>
                                        <field name="payment_type" column_invisible="True"/>
                                        <field name="company_id" column_invisible="True"/>
                                        <field name="sequence" widget="handle"/>
                                        <field name="payment_method_id" options="{'no_create': True, 'no_open': True}"/>
                                        <field name="name"/>
                                        <field name="payment_account_id" placeholder="No payment journal entries" string="Outstanding Receipts accounts" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                    </list>
                                </field>
                            </page>
                            <page id="outbound_payment_settings" string="Outgoing Payments" name="page_outgoing_payments" invisible="type not in ['cash', 'bank', 'credit']">
                                    <field name="outbound_payment_method_line_ids" nolabel="1" context="{'default_payment_type': 'outbound'}">
                                        <list string="Payment Methods" editable="bottom">
                                            <field name="available_payment_method_ids" column_invisible="True"/>
                                            <field name="payment_type" column_invisible="True"/>
                                            <field name="company_id" column_invisible="True"/>
                                            <field name="sequence" widget="handle"/>
                                            <field name="payment_method_id" options="{'no_create': True, 'no_open': True}"/>
                                            <field name="name"/>
                                            <field name="payment_account_id" placeholder="No payment journal entries" string="Outstanding Payments accounts" options="{'no_quick_create': True}" groups="account.group_account_readonly"/>
                                        </list>
                                    </field>
                                    <field name="selected_payment_method_codes" invisible="1"/>
                                    <group name="outgoing_payment"/>
                            </page>
                            <page name="advanced_settings" string="Advanced Settings">
                                <group>
                                    <group string="Automation" groups="account.group_account_manager">
                                        <field name="restrict_mode_hash_table" groups="account.group_account_readonly" invisible="type not in ['sale', 'purchase', 'general']"/>
                                    </group>
                                    <group string="Emails" name="group_email_alias" invisible="type not in ('general', 'sale', 'purchase')">
                                        <field name="display_alias_fields" invisible="1"/>
                                        <div class="o_row" colspan="2" invisible="display_alias_fields">
                                            <a type="action" name="277" class="btn btn-link" role="button">
                                                <i class="oi oi-fw o_button_icon oi-arrow-right"/> Configure Alias Domain
                                            </a>
                                        </div>
                                        <div class="o_row" colspan="2" dir="ltr" invisible="not display_alias_fields">
                                            <label string="Email Alias" for="alias_name"/>
                                            <field name="alias_name" placeholder="alias"/>@
                                            <field name="alias_domain_id" placeholder="e.g. mycompany.com" options="{'no_create': True, 'no_open': True}"/>
                                        </div>
                                        <field name="incoming_einvoice_notification_email" invisible="type != 'purchase'" placeholder="Enter an email to get notified"/>
                                    </group>
                                    <!-- edi -->
                                    <group name="group_edi_config" string="Electronic Data Interchange" invisible="1"/>
                                    <group string="Payment Communications" invisible="type != 'sale'">
                                        <field name="invoice_reference_type"/>
                                        <field name="invoice_reference_model" invisible="invoice_reference_type == 'none'"/>
                                    </group>
                                </group>
                            </page>
                        </notebook>
                    </sheet>
                <chatter/>
                </form>
            