<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="tax_report_vat" model="account.report">
        <field name="name">VAT Return</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.be"/>
        <field name="filter_fiscal_position" eval="True"/>
        <field name="availability_condition">country</field>
        <field name="column_ids">
            <record id="tax_report_vat_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_title_operations" model="account.report.line">
                <field name="name">Operations</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="tax_report_title_operations_sortie" model="account.report.line">
                        <field name="name">II Outgoing</field>
                        <field name="hierarchy_level">1</field>
                        <field name="children_ids">
                            <record id="tax_report_line_00" model="account.report.line">
                                <field name="name">00 - Operations subject to a special regulation</field>
                                <field name="code">c00</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_00_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">00</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_01" model="account.report.line">
                                <field name="name">01 - Operations subject to 6% VAT</field>
                                <field name="code">c01</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_01_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">01</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_02" model="account.report.line">
                                <field name="name">02 - Operations subject to 12% VAT</field>
                                <field name="code">c02</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_02_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">02</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_03" model="account.report.line">
                                <field name="name">03 - Operations subject to 21% VAT</field>
                                <field name="code">c03</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_03_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">03</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_44" model="account.report.line">
                                <field name="name">44 - Intra-Community services</field>
                                <field name="code">c44</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_44_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">44</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_45" model="account.report.line">
                                <field name="name">45 - Operations subject to VAT due by the co-contractor</field>
                                <field name="code">c45</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_45_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">45</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_title_operations_sortie_46" model="account.report.line">
                                <field name="name">46 - Exempted intra-Community deliveries and ABC sales</field>
                                <field name="code">c46</field>
                                <field name="aggregation_formula">c46L.balance + c46T.balance</field>
                                <field name="children_ids">
                                    <record id="tax_report_line_46L" model="account.report.line">
                                        <field name="name">46L - Exempted intra-Community deliveries</field>
                                        <field name="code">c46L</field>
                                        <field name="expression_ids">
                                            <record id="tax_report_line_46L_tag" model="account.report.expression">
                                                <field name="label">balance</field>
                                                <field name="engine">tax_tags</field>
                                                <field name="formula">46L</field>
                                            </record>
                                        </field>
                                    </record>
                                    <record id="tax_report_line_46T" model="account.report.line">
                                        <field name="name">46T - ABC sales</field>
                                        <field name="code">c46T</field>
                                        <field name="expression_ids">
                                            <record id="tax_report_line_46T_tag" model="account.report.expression">
                                                <field name="label">balance</field>
                                                <field name="engine">tax_tags</field>
                                                <field name="formula">46T</field>
                                            </record>
                                        </field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_47" model="account.report.line">
                                <field name="name">47 - Other exempted operations and operations carried out abroad</field>
                                <field name="code">c47</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_47_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">47</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_title_operations_sortie_48" model="account.report.line">
                                <field name="name">48 - Credit notes for operations in grids [44] and [46]</field>
                                <field name="code">c48</field>
                                <field name="aggregation_formula">c48s44.balance + c48s46L.balance + c48s46T.balance</field>
                                <field name="children_ids">
                                    <record id="tax_report_line_48s44" model="account.report.line">
                                        <field name="name">48s44 - Credit notes for operations in grid [44]</field>
                                        <field name="code">c48s44</field>
                                        <field name="expression_ids">
                                            <record id="tax_report_line_48s44_tag" model="account.report.expression">
                                                <field name="label">balance</field>
                                                <field name="engine">tax_tags</field>
                                                <field name="formula">48s44</field>
                                            </record>
                                        </field>
                                    </record>
                                    <record id="tax_report_line_48s46L" model="account.report.line">
                                        <field name="name">48s46L - Credit notes for operations in grid [46L]</field>
                                        <field name="code">c48s46L</field>
                                        <field name="expression_ids">
                                            <record id="tax_report_line_48s46L_tag" model="account.report.expression">
                                                <field name="label">balance</field>
                                                <field name="engine">tax_tags</field>
                                                <field name="formula">48s46L</field>
                                            </record>
                                        </field>
                                    </record>
                                    <record id="tax_report_line_48s46T" model="account.report.line">
                                        <field name="name">48s46T - Credit notes for operations in grid [46T]</field>
                                        <field name="code">c48s46T</field>
                                        <field name="expression_ids">
                                            <record id="tax_report_line_48s46T_tag" model="account.report.expression">
                                                <field name="label">balance</field>
                                                <field name="engine">tax_tags</field>
                                                <field name="formula">48s46T</field>
                                            </record>
                                        </field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_49" model="account.report.line">
                                <field name="name">49 - Credit notes for other operations in part II</field>
                                <field name="code">c49</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_49_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">49</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_title_operations_entree" model="account.report.line">
                        <field name="name">III Incoming</field>
                        <field name="hierarchy_level">1</field>
                        <field name="children_ids">
                            <record id="tax_report_line_81" model="account.report.line">
                                <field name="name">81 - Trade goods, raw materials and consumables</field>
                                <field name="code">c81</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_81_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">81</field>
                                    </record>
                                    <record id="tax_report_line_81_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_81_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c81._applied_carryover_balance + c81.tag</field>
                                    </record>
                                    <record id="tax_report_line_81_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c81.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_81_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c81.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_82" model="account.report.line">
                                <field name="name">82 - Services and miscellaneous goods</field>
                                <field name="code">c82</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_82_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">82</field>
                                    </record>
                                    <record id="tax_report_line_82_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_82_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c82._applied_carryover_balance + c82.tag</field>
                                    </record>
                                    <record id="tax_report_line_82_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c82.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_82_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c82.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_83" model="account.report.line">
                                <field name="name">83 - Investment goods</field>
                                <field name="code">c83</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_83_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">83</field>
                                    </record>
                                    <record id="tax_report_line_83_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_83_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c83._applied_carryover_balance + c83.tag</field>
                                    </record>
                                    <record id="tax_report_line_83_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c83.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_83_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c83.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_84" model="account.report.line">
                                <field name="name">84 - Credit notes for operations in grids [86] and [88]</field>
                                <field name="code">c84</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_84_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">84</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_85" model="account.report.line">
                                <field name="name">85 - Credit notes received relating to other operations in part III</field>
                                <field name="code">c85</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_85_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">85</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_86" model="account.report.line">
                                <field name="name">86 - Intra-Community acquisitions and ABC sales</field>
                                <field name="code">c86</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_86_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">86</field>
                                    </record>
                                    <record id="tax_report_line_86_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_86_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c86._applied_carryover_balance + c86.tag</field>
                                    </record>
                                    <record id="tax_report_line_86_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c86.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_86_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c86.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_87" model="account.report.line">
                                <field name="name">87 - Other operations subject to VAT</field>
                                <field name="code">c87</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_87_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">87</field>
                                    </record>
                                    <record id="tax_report_line_87_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_87_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c87._applied_carryover_balance + c87.tag</field>
                                    </record>
                                    <record id="tax_report_line_87_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c87.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_87_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c87.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_88" model="account.report.line">
                                <field name="name">88 - Intra-Community services with reverse charge</field>
                                <field name="code">c88</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_88_tag" model="account.report.expression">
                                        <field name="label">tag</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">88</field>
                                    </record>
                                    <record id="tax_report_line_88_applied_carryover" model="account.report.expression">
                                        <field name="label">_applied_carryover_balance</field>
                                        <field name="engine">external</field>
                                        <field name="formula">most_recent</field>
                                        <field name="date_scope">previous_tax_period</field>
                                    </record>
                                    <record id="tax_report_line_88_balance_unbound" model="account.report.expression">
                                        <field name="label">balance_unbound</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c88._applied_carryover_balance + c88.tag</field>
                                    </record>
                                    <record id="tax_report_line_88_carryover" model="account.report.expression">
                                        <field name="label">_carryover_balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c88.balance_unbound</field>
                                        <field name="subformula">if_below(EUR(0))</field>
                                    </record>
                                    <record id="tax_report_line_88_balance" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">c88.balance_unbound</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="tax_report_title_taxes" model="account.report.line">
                <field name="name">Taxes</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="tax_report_title_taxes_dues" model="account.report.line">
                        <field name="name">IV Due</field>
                        <field name="hierarchy_level">1</field>
                        <field name="children_ids">
                            <record id="tax_report_line_54" model="account.report.line">
                                <field name="name">54 - VAT on operations in grids [01], [02] and [03]</field>
                                <field name="code">c54</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_54_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">54</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_55" model="account.report.line">
                                <field name="name">55 - VAT on operations in grids [86] and [88]</field>
                                <field name="code">c55</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_55_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">55</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_56" model="account.report.line">
                                <field name="name">56 - VAT on operations in grid [87], with the exception of imports with reverse charge</field>
                                <field name="code">c56</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_56_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">56</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_57" model="account.report.line">
                                <field name="name">57 - VAT on import with reverse charge</field>
                                <field name="code">c57</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_57_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">57</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_61" model="account.report.line">
                                <field name="name">61 - Various VAT regularizations in favor of the State</field>
                                <field name="code">c61</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_61_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">61</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_63" model="account.report.line">
                                <field name="name">63 - VAT to be paid back on credit notes received</field>
                                <field name="code">c63</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_63_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">63</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_title_taxes_deductibles" model="account.report.line">
                        <field name="name">V Deductible</field>
                        <field name="hierarchy_level">1</field>
                        <field name="children_ids">
                            <record id="tax_report_line_59" model="account.report.line">
                                <field name="name">59 - Deductible VAT</field>
                                <field name="code">c59</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_59_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">59</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_62" model="account.report.line">
                                <field name="name">62 - Various VAT regularizations in favor of the declarant</field>
                                <field name="code">c62</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_62_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">62</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_64" model="account.report.line">
                                <field name="name">64 - VAT to be recovered on credit notes issued</field>
                                <field name="code">c64</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_64_tag" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">tax_tags</field>
                                        <field name="formula">64</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                    <record id="tax_report_title_taxes_soldes" model="account.report.line">
                        <field name="name">VI Balance</field>
                        <field name="hierarchy_level">1</field>
                        <field name="children_ids">
                            <record id="tax_report_line_71" model="account.report.line">
                                <field name="name">71 - Taxes due to the State</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_71_formula" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">(c54.balance + c55.balance + c56.balance + c57.balance + c61.balance + c63.balance) - (c59.balance + c62.balance + c64.balance)</field>
                                        <field name="subformula">if_above(EUR(0))</field>
                                    </record>
                                </field>
                            </record>
                            <record id="tax_report_line_72" model="account.report.line">
                                <field name="name">72 - Amount owed by the State</field>
                                <field name="expression_ids">
                                    <record id="tax_report_line_72_formula" model="account.report.expression">
                                        <field name="label">balance</field>
                                        <field name="engine">aggregation</field>
                                        <field name="formula">(c59.balance + c62.balance + c64.balance) - (c54.balance + c55.balance + c56.balance + c57.balance + c61.balance + c63.balance)</field>
                                        <field name="subformula">if_above(EUR(0))</field>
                                    </record>
                                </field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
        </field>
    </record>
</odoo>
