<?xml version="1.0" encoding="utf-8"?>
<odoo auto_sequence="1">
    <record id="tax_report" model="account.report">
        <field name="name">Tax Report</field>
        <field name="name@vi_VN">Báo cáo Thuế</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.vn"/>
        <field name="allow_foreign_vat" eval="True"/>
        <field name="availability_condition">country</field>
        <field name="column_ids">
            <record id="tax_report_amount_untaxed" model="account.report.column">
                <field name="name">Base Amount</field>
                <field name="name@vi_VN">Số tiền gốc</field>
                <field name="expression_label">amount_untaxed</field>
            </record>
            <record id="tax_report_balance" model="account.report.column">
                <field name="name">Balance</field>
                <field name="name@vi_VN">Số dư</field>
                <field name="expression_label">balance</field>
            </record>
        </field>
        <field name="line_ids">
            <record id="account_tax_report_line_01_vn" model="account.report.line">
                <field name="name">Purchase of Goods and Services</field>
                <field name="name@vi_VN">HHDV Mua vào</field>
                <field name="aggregation_formula">VAT_PURCHASE.balance + VAT_PURCHASE_IMPORTED.balance + VAT_PURCHASE_IMPORT_TAX.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="expression_ids">
                    <record id="account_tax_report_line_01_vn_tag_base" model="account.report.expression">
                        <field name="label">amount_untaxed</field>
                        <field name="engine">aggregation</field>
                        <field name="formula">VAT_PURCHASE.amount_untaxed + VAT_PURCHASE_IMPORTED.amount_untaxed + VAT_PURCHASE_IMPORT_TAX.amount_untaxed</field>
                    </record>
                </field>
                <field name="children_ids">
                    <record id="account_tax_report_line_01_01_vn" model="account.report.line">
                        <field name="name">VAT on purchase of goods and services</field>
                        <field name="name@vi_VN">Thuế GTGT HHDV mua vào</field>
                        <field name="code">VAT_PURCHASE</field>
                        <field name="aggregation_formula">VAT_PURCHASE_0.balance + VAT_PURCHASE_5.balance + VAT_PURCHASE_8.balance + VAT_PURCHASE_10.balance</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_01_01_vn_tag_base" model="account.report.expression">
                                <field name="label">amount_untaxed</field>
                                <field name="engine">aggregation</field>
                                <field name="formula">VAT_PURCHASE_0.amount_untaxed + VAT_PURCHASE_5.amount_untaxed + VAT_PURCHASE_8.amount_untaxed + VAT_PURCHASE_10.amount_untaxed + VAT_PURCHASE_EXEMPTION.amount_untaxed</field>
                            </record>
                        </field>
                        <field name="children_ids">
                            <record id="account_tax_report_line_01_01_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of goods and services 0%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV mua vào chịu thuế 0%</field>
                                <field name="code">VAT_PURCHASE_0</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_01_01_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">Untaxed Purchase of Goods and Services taxed 0%</field>
                                    </record>
                                    <record id="account_tax_report_line_01_01_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">VAT on purchase of goods and services 0%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_02_01_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of goods and services 5%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV mua vào chịu thuế 5%</field>
                                <field name="code">VAT_PURCHASE_5</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_02_01_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">Untaxed Purchase of Goods and Services taxed 5%</field>
                                    </record>
                                    <record id="account_tax_report_line_02_01_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">VAT on purchase of goods and services 5%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_04_01_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of goods and services 8%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV mua vào chịu thuế 8%</field>
                                <field name="code">VAT_PURCHASE_8</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_04_01_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">Untaxed Purchase of Goods and Services taxed 8%</field>
                                    </record>
                                    <record id="account_tax_report_line_04_01_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">VAT on purchase of goods and services 8%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_03_01_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of goods and services 10%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV mua vào chịu thuế 10%</field>
                                <field name="code">VAT_PURCHASE_10</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_03_01_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">Untaxed Purchase of Goods and Services taxed 10%</field>
                                    </record>
                                    <record id="account_tax_report_line_03_01_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">VAT on purchase of goods and services 10%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_05_01_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of goods and services Exemption</field>
                                <field name="name@vi_VN">Không chịu thuế HHDV mua vào</field>
                                <field name="code">VAT_PURCHASE_EXEMPTION</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_05_01_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">Untaxed Purchase of Goods and Services taxed VAT Exemption</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_02_01_vn" model="account.report.line">
                        <field name="name">VAT on purchase of imported goods</field>
                        <field name="name@vi_VN">Giá trị HHDV Mua vào</field>
                        <field name="code">VAT_PURCHASE_IMPORTED</field>
                        <field name="aggregation_formula">VAT_PURCHASE_IMPORTED_0.balance + VAT_PURCHASE_IMPORTED_5.balance + VAT_PURCHASE_IMPORTED_8.balance + VAT_PURCHASE_IMPORTED_10.balance</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_02_01_vn_tag_base" model="account.report.expression">
                                <field name="label">amount_untaxed</field>
                                <field name="engine">aggregation</field>
                                <field name="formula">VAT_PURCHASE_IMPORTED_0.amount_untaxed + VAT_PURCHASE_IMPORTED_5.amount_untaxed + VAT_PURCHASE_IMPORTED_8.amount_untaxed + VAT_PURCHASE_IMPORTED_10.amount_untaxed</field>
                            </record>
                        </field>
                        <field name="children_ids">
                            <record id="account_tax_report_line_01_02_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of imported goods 0%</field>
                                <field name="name@vi_VN">Giá trị HHDV Mua vào chịu thuế 0%</field>
                                <field name="code">VAT_PURCHASE_IMPORTED_0</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_01_02_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_0_base</field>
                                    </record>
                                    <record id="account_tax_report_line_01_02_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_0</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_02_02_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of imported goods 5%</field>
                                <field name="name@vi_VN">Giá trị HHDV Mua vào chịu thuế 5%</field>
                                <field name="code">VAT_PURCHASE_IMPORTED_5</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_02_02_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_5_base</field>
                                    </record>
                                    <record id="account_tax_report_line_02_02_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_5</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_04_02_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of imported goods 8%</field>
                                <field name="name@vi_VN">Giá trị HHDV Mua vào chịu thuế 8%</field>
                                <field name="code">VAT_PURCHASE_IMPORTED_8</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_04_02_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_8_base</field>
                                    </record>
                                    <record id="account_tax_report_line_04_02_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_8</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_03_02_01_vn" model="account.report.line">
                                <field name="name">VAT on purchase of imported goods 10%</field>
                                <field name="name@vi_VN">Giá trị HHDV Mua vào chịu thuế 10%</field>
                                <field name="code">VAT_PURCHASE_IMPORTED_10</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_03_02_01_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_10_base</field>
                                    </record>
                                    <record id="account_tax_report_line_03_02_01_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">tax_purchase_import_10</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_03_01_vn" model="account.report.line">
                        <field name="name">Import Tax</field>
                        <field name="name@vi_VN">Thuế nhập khẩu</field>
                        <field name="code">VAT_PURCHASE_IMPORT_TAX</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_03_01_vn_tag_base" model="account.report.expression">
                                <field name="label">amount_untaxed</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">tax_import_base</field>
                            </record>
                            <record id="account_tax_report_line_03_01_vn_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">tax_import</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="account_tax_report_line_02_vn" model="account.report.line">
                <field name="name">Sales of Goods and Services</field>
                <field name="name@vi_VN">HHDV Bán ra</field>
                <field name="aggregation_formula">VAT_SALES.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="expression_ids">
                    <record id="account_tax_report_line_02_vn_tag_base" model="account.report.expression">
                        <field name="label">amount_untaxed</field>
                        <field name="engine">aggregation</field>
                        <field name="formula">VAT_SALES.amount_untaxed</field>
                    </record>
                </field>
                <field name="children_ids">
                    <record id="account_tax_report_line_01_02_vn" model="account.report.line">
                        <field name="name">VAT on sales of goods and services</field>
                        <field name="name@vi_VN">Thuế GTGT HHDV bán ra</field>
                        <field name="code">VAT_SALES</field>
                        <field name="aggregation_formula">VAT_SALES_0.balance + VAT_SALES_5.balance + VAT_SALES_8.balance + VAT_SALES_10.balance</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_01_02_vn_tag_base" model="account.report.expression">
                                <field name="label">amount_untaxed</field>
                                <field name="engine">aggregation</field>
                                <field name="formula">VAT_SALES_0.amount_untaxed + VAT_SALES_5.amount_untaxed + VAT_SALES_8.amount_untaxed + VAT_SALES_10.amount_untaxed + VAT_SALES_EXEMPTION.amount_untaxed</field>
                            </record>
                        </field>
                        <field name="children_ids">
                            <record id="account_tax_report_line_01_01_02_vn" model="account.report.line">
                                <field name="name">VAT on sales of goods and services 0%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV bán ra chịu thuế 0%</field>
                                <field name="code">VAT_SALES_0</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_01_01_02_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-Untaxed sales of goods and services taxed 0%</field>
                                    </record>
                                    <record id="account_tax_report_line_01_01_02_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">VAT on sales of goods and services 0%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_02_01_02_vn" model="account.report.line">
                                <field name="name">VAT on sales of goods and services 5%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV bán ra chịu thuế 5%</field>
                                <field name="code">VAT_SALES_5</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_02_01_02_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-Untaxed sales of goods and services taxed 5%</field>
                                    </record>
                                    <record id="account_tax_report_line_02_01_02_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-VAT on sales of goods and services 5%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_04_01_02_vn" model="account.report.line">
                                <field name="name">VAT on sales of goods and services 8%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV bán ra chịu thuế 8%</field>
                                <field name="code">VAT_SALES_8</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_04_01_02_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-Untaxed sales of goods and services taxed 8%</field>
                                    </record>
                                    <record id="account_tax_report_line_04_01_02_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-VAT on sales of goods and services 8%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_03_01_02_vn" model="account.report.line">
                                <field name="name">VAT on sales of goods and services 10%</field>
                                <field name="name@vi_VN">Thuế GTGT HHDV bán ra chịu thuế 10%</field>
                                <field name="code">VAT_SALES_10</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_03_01_02_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-Untaxed sales of goods and services taxed 10%</field>
                                    </record>
                                    <record id="account_tax_report_line_03_01_02_vn_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-VAT on sales of goods and services 10%</field>
                                    </record>
                                </field>
                            </record>
                            <record id="account_tax_report_line_05_01_02_vn" model="account.report.line">
                                <field name="name">VAT on sales of goods and services Exemption</field>
                                <field name="name@vi_VN">Không chịu thuế HHDV bán ra</field>
                                <field name="code">VAT_SALES_EXEMPTION</field>
                                <field name="expression_ids">
                                    <record id="account_tax_report_line_05_01_02_vn_tag_base" model="account.report.expression">
                                        <field name="label">amount_untaxed</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">-Untaxed sales of goods and services taxed VAT Exemption</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
        </field>
    </record>
</odoo>
