<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="account_move_efaktur_form_view" model="ir.ui.view">
        <field name="name">account.move.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form"/>
        <field name="arch" type="xml">
            <xpath expr="//group[@id='other_tab_group']" position="inside">
                <group string="Electronic Tax" invisible="country_code != 'ID'">
                    <field name="l10n_id_kode_transaksi" invisible="not l10n_id_coretax_efaktur_available" required="l10n_id_coretax_efaktur_available" readonly="state == 'posted'"/>
                    <field name="l10n_id_coretax_document"/>
                    <field name="l10n_id_coretax_efaktur_available" invisible="1"/>
                    <field name="l10n_id_coretax_add_info_07" invisible="l10n_id_kode_transaksi != '07'" string="Additional Information"/>
                    <field name="l10n_id_coretax_facility_info_07" invisible="l10n_id_kode_transaksi != '07'" string="Facility Stamp"/>
                    <field name="l10n_id_coretax_add_info_08" invisible="l10n_id_kode_transaksi != '08'" string="Additional Information"/>
                    <field name="l10n_id_coretax_facility_info_08" invisible="l10n_id_kode_transaksi != '08'" string="Facility Stamp"/>`
                    <field name="l10n_id_coretax_custom_doc" invisible="l10n_id_kode_transaksi not in ('07', '08')" string="Custom Documentation"/>
                    <field name="l10n_id_coretax_custom_doc_month_year" invisible="l10n_id_kode_transaksi not in ('07', '08')" options="{'max_precision': 'months', 'min_precision': 'months'}"/>
                </group>
            </xpath>
        </field>
    </record>

    <record id="dowload_efaktur_action" model="ir.actions.server">
        <field name="name">Download e-Faktur</field>
        <field name="model_id" ref="account.model_account_move"/>
        <field name="binding_model_id" ref="account.model_account_move"/>
        <field name="state">code</field>
        <field name="code">action = records.download_efaktur()</field>
    </record>

    <record id="view_account_invoice_filter" model="ir.ui.view">
        <field name="name">account.move.select.l10n_id.inherit</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_account_invoice_filter"/>
        <field name="arch" type="xml">
            <field name="name" position="after">
                <field name="l10n_id_coretax_document"/>
            </field>
        </field>
    </record>
</odoo>
