<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="tax_report" model="account.report">
        <field name="name">Tax Report</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.br"/>
        <field name="filter_fiscal_position" eval="True"/>
        <field name="availability_condition">country</field>
        <field name="column_ids">
            <record id="tax_report_balance" model="account.report.column">
                <field name="name">Balance</field>
                <field name="expression_label">balance</field>
            </record>
        </field>
        <field name="line_ids">
            <record id="tax_report_icms" model="account.report.line">
                <field name="name">ICMS</field>
                <field name="aggregation_formula">TRIBUTADA_INTEGRALMENTE.balance + TRIBUTADA_E_COM_COBRANCA_DO_ICMS_POR_SUBSTITUICAO_TRIBUTARIA.balance</field>
                <field name="children_ids">
                    <record id="tax_report_icms_tributada" model="account.report.line">
                        <field name="name">Tributada integralmente</field>
                        <field name="code">TRIBUTADA_INTEGRALMENTE</field>
                        <field name="aggregation_formula">ICMS_1.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_icms_1" model="account.report.line">
                                <field name="name">ICMS base</field>
                                <field name="code">ICMS_1</field>
                                <field name="expression_ids">
                                    <record id="tax_report_icms_1_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">ICMS_1</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_icms_tributada_com" model="account.report.line">
                        <field name="name">Tributada e com cobrança do ICMS por substituição tributária</field>
                        <field name="code">TRIBUTADA_E_COM_COBRANCA_DO_ICMS_POR_SUBSTITUICAO_TRIBUTARIA</field>
                        <field name="aggregation_formula">ICMS_2.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_icms_2" model="account.report.line">
                                <field name="name">ICMS tax</field>
                                <field name="code">ICMS_2</field>
                                <field name="expression_ids">
                                    <record id="tax_report_icms_2_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">ICMS_2</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_icmsst" model="account.report.line">
                <field name="name">ICMS Subist</field>
                <field name="aggregation_formula">ICMSST_1.balance + ICMSST_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_icmsst_1" model="account.report.line">
                        <field name="name">ICMSST base</field>
                        <field name="code">ICMSST_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_icmsst_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">ICMSST_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_icmsst_2" model="account.report.line">
                        <field name="name">ICMSST tax</field>
                        <field name="code">ICMSST_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_icmsst_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">ICMSST_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_irpj" model="account.report.line">
                <field name="name">IRPJ</field>
                <field name="aggregation_formula">IRPJ_1.balance + IRPJ_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_irpj_1" model="account.report.line">
                        <field name="name">IRPJ base</field>
                        <field name="code">IRPJ_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_irpj_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">IRPJ_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_irpj_2" model="account.report.line">
                        <field name="name">IRPJ tax</field>
                        <field name="code">IRPJ_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_irpj_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">IRPJ_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_ir" model="account.report.line">
                <field name="name">IR</field>
                <field name="aggregation_formula">IR_1.balance + IR_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_ir_1" model="account.report.line">
                        <field name="name">IR base</field>
                        <field name="code">IR_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_ir_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">IR_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_ir_2" model="account.report.line">
                        <field name="name">IR tax</field>
                        <field name="code">IR_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_ir_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">IR_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_issqn" model="account.report.line">
                <field name="name">ISSQN</field>
                <field name="aggregation_formula">ISSQN_1.balance + ISSQN_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_issqn_1" model="account.report.line">
                        <field name="name">ISSQN base</field>
                        <field name="code">ISSQN_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_issqn_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">ISSQN_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_issqn_2" model="account.report.line">
                        <field name="name">ISSQN tax</field>
                        <field name="code">ISSQN_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_issqn_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">ISSQN_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_csll" model="account.report.line">
                <field name="name">CSLL</field>
                <field name="aggregation_formula">CSLL_1.balance + CSLL_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_csll_1" model="account.report.line">
                        <field name="name">CSLL base</field>
                        <field name="code">CSLL_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_csll_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">CSLL_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_csll_2" model="account.report.line">
                        <field name="name">CSLL tax</field>
                        <field name="code">CSLL_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_csll_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">CSLL_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_cofins" model="account.report.line">
                <field name="name">COFINS</field>
                <field name="aggregation_formula">COFINS_OPERACAO_TRIBUTAVEL_COM_ALIQUOTA_BASICA.balance</field>
                <field name="children_ids">
                    <record id="tax_report_cofins_oper_bas" model="account.report.line">
                        <field name="name">Operação Tributável com Alíquota Básica</field>
                        <field name="code">COFINS_OPERACAO_TRIBUTAVEL_COM_ALIQUOTA_BASICA</field>
                        <field name="aggregation_formula">COFINS_1.balance + COFINS_2.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_cofins_1" model="account.report.line">
                                <field name="name">COFINS base</field>
                                <field name="code">COFINS_1</field>
                                <field name="expression_ids">
                                    <record id="tax_report_cofins_1_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">COFINS_1</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_cofins_2" model="account.report.line">
                                <field name="name">COFINS tax</field>
                                <field name="code">COFINS_2</field>
                                <field name="expression_ids">
                                    <record id="tax_report_cofins_2_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">COFINS_2</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_pis" model="account.report.line">
                <field name="name">PIS</field>
                <field name="aggregation_formula">PIS_OPERACAO_TRIBUTAVEL_COM_ALIQUOTA_BASICA.balance</field>
                <field name="children_ids">
                    <record id="tax_report_pis_oper_tri_basica" model="account.report.line">
                        <field name="name">Operação Tributável com Alíquota Básica</field>
                        <field name="code">PIS_OPERACAO_TRIBUTAVEL_COM_ALIQUOTA_BASICA</field>
                        <field name="aggregation_formula">PIS_1.balance + PIS_2.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_pis_1" model="account.report.line">
                                <field name="name">PIS base</field>
                                <field name="code">PIS_1</field>
                                <field name="expression_ids">
                                    <record id="tax_report_pis_1_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">PIS_1</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_pis_2" model="account.report.line">
                                <field name="name">PIS tax</field>
                                <field name="code">PIS_2</field>
                                <field name="expression_ids">
                                    <record id="tax_report_pis_2_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">PIS_2</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_ipi" model="account.report.line">
                <field name="name">IPI</field>
                <field name="code">BRTAX07</field>
                <field name="aggregation_formula">ENTRADA_COM_RECUPERACAO_DE_CREDITO.balance + ENTRADA_TRIBUTADA_COM_ALIQUOTA_ZERO.balance</field>
                <field name="children_ids">
                    <record id="tax_report_ipi_extrada_com" model="account.report.line">
                        <field name="name">Entrada com recuperação de crédito</field>
                        <field name="code">ENTRADA_COM_RECUPERACAO_DE_CREDITO</field>
                        <field name="aggregation_formula">BRTAX07_1.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_ipi_1" model="account.report.line">
                                <field name="name">IPI base</field>
                                <field name="code">BRTAX07_1</field>
                                <field name="expression_ids">
                                    <record id="tax_report_ipi_1_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">IPI_1</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_ipi_extrada_tributada" model="account.report.line">
                        <field name="name">Entrada tributada com alíquota zero</field>
                        <field name="code">ENTRADA_TRIBUTADA_COM_ALIQUOTA_ZERO</field>
                        <field name="aggregation_formula">IPI_2.balance</field>
                        <field name="children_ids">
                            <record id="tax_report_ipi_2" model="account.report.line">
                                <field name="name">IPI tax</field>
                                <field name="code">IPI_2</field>
                                <field name="expression_ids">
                                    <record id="tax_report_ipi_2_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">IPI_2</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_ii" model="account.report.line">
                <field name="name">II</field>
                <field name="aggregation_formula">II_1.balance + II_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_ii_1" model="account.report.line">
                        <field name="name">II base</field>
                        <field name="code">II_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_ii_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">II_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_ii_2" model="account.report.line">
                        <field name="name">II tax</field>
                        <field name="code">II_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_ii_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">II_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_inss" model="account.report.line">
                <field name="name">INSS</field>
                <field name="aggregation_formula">INSS_1.balance + INSS_2.balance</field>
                <field name="children_ids">
                    <record id="tax_report_inss_1" model="account.report.line">
                        <field name="name">INSS base</field>
                        <field name="code">INSS_1</field>
                        <field name="expression_ids">
                            <record id="tax_report_inss_1_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">INSS_1</field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_inss_2" model="account.report.line">
                        <field name="name">INSS tax</field>
                        <field name="code">INSS_2</field>
                        <field name="expression_ids">
                            <record id="tax_report_inss_2_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">INSS_2</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
        </field>
    </record>
</odoo>
