<?xml version="1.0"?>
<form string="Fiscal Position">
                    <div groups="account.group_account_manager" class="alert alert-info mb-0" role="alert" attrs="{'invisible': [('foreign_vat_header_mode', '=', False)]}">

                        <div attrs="{'invisible': [('foreign_vat_header_mode', '!=', 'templates_found')]}">
                            Click
                            <button string="here" type="object" name="action_create_foreign_taxes" class="oe_link" style="padding: 0; vertical-align: baseline;"/>
                            to create the taxes for this country.
                        </div>

                        <span attrs="{'invisible': [('foreign_vat_header_mode', '!=', 'no_template')]}">
                            No tax template found for this country. Please install the corresponding localization module.
                            <button string="Install new module" type="action" name="account.open_account_charts_modules" class="oe_link" groups="base.group_system" style="padding: 0; vertical-align: baseline;"/>
                        </span>
                    </div>

                    <sheet>
                    <div class="oe_button_box" name="button_box"/>
                    <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
                    <group>
                        <group>
                            <field name="active" invisible="1"/>
                            <field name="company_id" invisible="1"/>
                            <field name="states_count" invisible="1"/>
                            <field name="company_country_id" invisible="1"/>
                            <field name="foreign_vat_header_mode" invisible="1"/>
                            <field name="name"/>
                            <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
                        </group>
                        <group>
                            <field name="auto_apply"/>
                            <field name="vat_required" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
                            <field name="foreign_vat"/>
                            <field name="country_group_id" attrs="{'invisible': [('auto_apply', '=', False), ('foreign_vat', '=', False)], 'required': [('foreign_vat', '!=', False), ('country_id', '=', False)]}"/>
                            <field name="country_id" attrs="{'required': [('foreign_vat', '!=', False), ('country_group_id', '=', False)]}" options="{'no_open': True, 'no_create': True}"/>
                            <field name="state_ids" widget="many2many_tags" domain="[('country_id', '=', country_id)]" attrs="{'invisible': ['|', '|', '&amp;', ('auto_apply', '!=', True), ('foreign_vat', '=', False), ('country_id', '=', False), ('states_count', '=', 0)]}"/>
                            <label for="zip_from" string="Zip Range" attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}"/>
                            <div attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}">
                                <span> From </span>
                                <field name="zip_from" class="oe_inline"/>
                                <div class="oe_edit_only"/>
                                <span> To </span>
                                <field name="zip_to" class="oe_inline"/>
                            </div>
                        </group>
                    </group>
                    <notebook>
                        <page name="tax_mapping" string="Tax Mapping">
                            <field name="tax_ids" widget="one2many" nolabel="1" context="{'append_type_to_tax_name': True}">
                                <tree name="tax_map_tree" string="Tax Mapping" editable="bottom" no_open="1" decoration-muted="tax_dest_id and not tax_dest_active">
                                    <field name="tax_dest_active" invisible="1"/>
                                    <field name="tax_src_id" domain="[                                             ('type_tax_use', '!=', 'none'),                                             ('country_id', '=', parent.company_country_id),                                             '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)                                         ]" context="{'append_type_to_tax_name': True}"/>

                                    <field name="tax_dest_id" domain="[                                             ('type_tax_use', '!=', 'none'),                                             ('country_id', '=', parent.country_id if parent.foreign_vat else parent.company_country_id),                                             '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" context="{'append_type_to_tax_name': True}"/>
                                </tree>
                                <form name="tax_map_form" string="Tax Mapping">
                                    <group>
                                        <field name="tax_src_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/>
                                        <field name="tax_dest_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/>
                                    </group>
                                </form>
                            </field>
                        </page>
                        <page name="account_mapping" string="Account Mapping" groups="account.group_account_readonly">
                            <field name="account_ids" widget="one2many" nolabel="1">
                                <tree string="Account Mapping" editable="bottom">
                                    <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
                                    <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
                                </tree>
                                <form string="Account Mapping">
                                    <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
                                    <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
                                </form>
                            </field>
                        </page>
                    </notebook>
                    <field name="note" class="oe-bordered-editor" placeholder="Legal Notes..."/>
                    </sheet>
                </form>
            