<commit_before><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Binovo IT Human Project SL
     Copyright 2021 Digital5, S.L.
     Copyright 2022 Landoo Sistemas de Informacion SL
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

    <record id="view_move_form_tbai_batuz" model="ir.ui.view">
        <field name="name">view.move.form.tbai.batuz</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="l10n_es_ticketbai.view_move_form_inherit" />
        <field name="arch" type="xml">
            <xpath
                expr="//page[@name='ticketbai']/group[@name='tbai_responses']"
                position="after"
            >
                <group
                    name="lroe_responses_lines"
                    string="LROE Responses"
                    attrs="{'invisible': [('lroe_response_line_ids', '=', [])]}"
                >
                    <field
                        name="lroe_response_line_ids"
                        nolabel="1"
                        options="{'no_create_edit': True}"
                    >
                        <form>
                            <header>
                                <field name="state" widget="statusbar" readonly="1" />
                            </header>
                            <sheet>
                                <group name="lroe_response_main_group">
                                    <field name="lroe_operation_id" />
                                    <field name="code" />
                                    <field name="description" />
                                </group>
                            </sheet>
                        </form>
                        <tree
                            create="false"
                            delete="false"
                            decoration-danger="state=='Incorrecto'"
                        >
                            <field name="create_date" />
                            <field name="response_message" />
                            <field name="state" />
                        </tree>
                    </field>
                </group>
            </xpath>
        </field>
    </record>

    <record id="move_supplier_form_inherit_l10n_es_ticketbai_batuz" model="ir.ui.view">
        <field name="name">account.move.supplier.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
            <button name="button_draft" position="after">
                <field name="lroe_state" invisible="1" />
                <button
                    type="object"
                    string="Resend to LROE"
                    name="action_send_lroe_manually"
                    groups="l10n_es_aeat.group_account_aeat"
                    attrs="{'invisible': ['|', ('type', 'not in', ['in_invoice', 'in_refund']), ('lroe_state', 'not in', ['error','recorded_warning'])]}"
                />
            </button>
            <xpath expr="//notebook" position="inside">
                <page
                    name='lroe_result'
                    string="LROE"
                    attrs="{'invisible': ['|', ('type', 'not in', ['in_invoice', 'in_refund']), ('tbai_enabled', '=', False)]}"
                >
                    <field name="tbai_enabled" invisible="1" />
                    <group
                        name="lroe_refund"
                        string="Refund"
                        attrs="{'invisible': ['|', '|', ('tbai_enabled', '!=', True), ('tbai_refund_origin_ids', '!=', []), ('type', '!=', 'in_refund')]}"
                    >
                        <field
                            name="reversed_entry_id"
                            attrs="{'required': [('tbai_enabled', '!=', True), ('type', '=', 'in_refund'), ('tbai_refund_origin_ids', '=', [])], 'readonly': [('state', '!=', 'draft')]}"
                        />
                    </group>
                    <group>
                        <group name="tbai_vat_purchase_regimes" string="VAT Regimes">
                            <field
                                name="tbai_vat_regime_purchase_key"
                                attrs="{'required': [('tbai_enabled', '=', True), ('type', 'in', ['in_invoice', 'in_refund'])], 'readonly': [('state', '!=', 'draft')]}"
                                options="{'no_open': True,'no_create': True}"
                            />
                            <field
                                name="tbai_vat_regime_purchase_key2"
                                attrs="{'readonly': [('state', '!=', 'draft')]}"
                                options="{'no_open':True,'no_create':True}"
                            />
                            <field
                                name="tbai_vat_regime_purchase_key3"
                                attrs="{'readonly': [('state', '!=', 'draft')]}"<commit_msg>[FIX]l10n_es_ticketbai_batuz: Corregido dominio required reversed_entry_id.<commit_after><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Binovo IT Human Project SL
     Copyright 2021 Digital5, S.L.
     Copyright 2022 Landoo Sistemas de Informacion SL
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

    <record id="view_move_form_tbai_batuz" model="ir.ui.view">
        <field name="name">view.move.form.tbai.batuz</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="l10n_es_ticketbai.view_move_form_inherit" />
        <field name="arch" type="xml">
            <xpath
                expr="//page[@name='ticketbai']/group[@name='tbai_responses']"
                position="after"
            >
                <group
                    name="lroe_responses_lines"
                    string="LROE Responses"
                    attrs="{'invisible': [('lroe_response_line_ids', '=', [])]}"
                >
                    <field
                        name="lroe_response_line_ids"
                        nolabel="1"
                        options="{'no_create_edit': True}"
                    >
                        <form>
                            <header>
                                <field name="state" widget="statusbar" readonly="1" />
                            </header>
                            <sheet>
                                <group name="lroe_response_main_group">
                                    <field name="lroe_operation_id" />
                                    <field name="code" />
                                    <field name="description" />
                                </group>
                            </sheet>
                        </form>
                        <tree
                            create="false"
                            delete="false"
                            decoration-danger="state=='Incorrecto'"
                        >
                            <field name="create_date" />
                            <field name="response_message" />
                            <field name="state" />
                        </tree>
                    </field>
                </group>
            </xpath>
        </field>
    </record>

    <record id="move_supplier_form_inherit_l10n_es_ticketbai_batuz" model="ir.ui.view">
        <field name="name">account.move.supplier.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
            <button name="button_draft" position="after">
                <field name="lroe_state" invisible="1" />
                <button
                    type="object"
                    string="Resend to LROE"
                    name="action_send_lroe_manually"
                    groups="l10n_es_aeat.group_account_aeat"
                    attrs="{'invisible': ['|', ('type', 'not in', ['in_invoice', 'in_refund']), ('lroe_state', 'not in', ['error','recorded_warning'])]}"
                />
            </button>
            <xpath expr="//notebook" position="inside">
                <page
                    name='lroe_result'
                    string="LROE"
                    attrs="{'invisible': ['|', ('type', 'not in', ['in_invoice', 'in_refund']), ('tbai_enabled', '=', False)]}"
                >
                    <field name="tbai_enabled" invisible="1" />
                    <group
                        name="lroe_refund"
                        string="Refund"
                        attrs="{'invisible': ['|', '|', ('tbai_enabled', '!=', True), ('tbai_refund_origin_ids', '!=', []), ('type', '!=', 'in_refund')]}"
                    >
                        <field
                            name="reversed_entry_id"
                            attrs="{'required': [('tbai_enabled', '=', True), ('type', '=', 'in_refund'), ('tbai_refund_origin_ids', '=', [])], 'readonly': [('state', '!=', 'draft')]}"
                        />
                    </group>
                    <group>
                        <group name="tbai_vat_purchase_regimes" string="VAT Regimes">
                            <field
                                name="tbai_vat_regime_purchase_key"
                                attrs="{'required': [('tbai_enabled', '=', True), ('type', 'in', ['in_invoice', 'in_refund'])], 'readonly': [('state', '!=', 'draft')]}"
                                options="{'no_open': True,'no_create': True}"
                            />
                            <field
                                name="tbai_vat_regime_purchase_key2"
                                attrs="{'readonly': [('state', '!=', 'draft')]}"
                                options="{'no_open':True,'no_create':True}"
                            />
                            <field
                                name="tbai_vat_regime_purchase_key3"
                                attrs="{'readonly': [('state', '!=', 'draft')]}"
{'fraction_non_alphanumeric': 0.14562148287096455, 'fraction_numerical': 0.0061210386020337645, 'mean_word_length': 1.2060104529616724, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 2, '>': 115, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1785715', 'n_tokens_mistral': 2788, 'n_tokens_neox': 2593, 'n_words': 393}