<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="1">
        <!-- Types -->
        <record model="account.account.type" id="account_type_income_view1">
            <field name="name">Income View</field>
            <field name="code">view</field>
            <field name="report_type">income</field>
        </record>
        <record model="account.account.type" id="account_type_expense_view1">
            <field name="name">Expense View</field>
            <field name="code">expense</field>
            <field name="report_type">expense</field>
        </record>
        <record model="account.account.type" id="account_type_asset_view1">
            <field name="name">Asset View</field>
            <field name="code">asset</field>
            <field name="report_type">asset</field>
        </record>
        <record model="account.account.type" id="account_type_liability_view1">
            <field name="name">Liability View</field>
            <field name="code">liability</field>
            <field name="report_type">liability</field>
        </record>
        <record model="account.account.type" id="conf_account_type_tax">
          <field name="name">Tax</field>
          <field name="code">tax</field>
          <field name="close_method">unreconciled</field>
          <field name="report_type">expense</field>
        </record>
        <record model="account.account.type" id="conf_account_type_equity">
          <field name="name">Equity</field>
          <field name="code">equity</field>
          <field name="close_method">balance</field>
          <field name="report_type">liability</field>
        </record>
        <record model="account.account.type" id="conf_account_type_chk">
          <field name="name">Check</field>
          <field name="code">check</field>
          <field name="close_method">balance</field>
          <field name="report_type">asset</field>
        </record>

        <!-- Account Templates-->
        <record id="conf_chart0" model="account.account.template">
            <field name="code">0</field>
            <field name="name">Configurable Account Chart</field>
            <field name="type">view</field>
            <field name="user_type" ref="data_account_type_view"/>
        </record>

           <!-- Balance Sheet -->

        <record id="conf_bal" model="account.account.template">
            <field name="code">1</field>
            <field name="name">Balance Sheet</field>
            <field ref="conf_chart0" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="data_account_type_view"/>
        </record>

            <record id="conf_fas" model="account.account.template">
                <field name="code">10</field>
                <field name="name">Fixed Assets</field>
                <field ref="conf_bal" name="parent_id"/>
                <field name="type">view</field>
                <field name="user_type" ref="account_type_asset_view1"/>
            </record>

                <record id="conf_xfa" model="account.account.template">
                    <field name="code">100</field>
                    <field name="name">Fixed Asset Account</field>
                    <field ref="conf_fas" name="parent_id"/>
                    <field name="type">other</field>
                    <field name="user_type" ref="account_type_asset_view1"/>
                </record>

            <record id="conf_nca" model="account.account.template">
                <field name="code">11</field>
                <field name="name">Net Current Assets</field>
                <field ref="conf_bal" name="parent_id"/>
                <field name="type">view</field>
                <field name="user_type" ref="account_type_asset_view1"/>
            </record>

                <record id="conf_cas" model="account.account.template">
                    <field name="code">110</field>
                    <field name="name">Current Assets</field>
                    <field ref="conf_nca" name="parent_id"/>
                    <field name="type">view</field>
                    <field name="user_type" ref="account_type_asset_view1"/>
                </record>

                    <record id="conf_stk" model="account.account.template">
                        <field name="code">1101</field>
                        <field name="name">Purchased Stocks</field>
                        <field ref="conf_cas" name="parent_id"/>
                        <field name="type">other</field>
                        <field name="user_type" ref="data_account_type_asset"/>
                    </record>

                    <record id="conf_a_recv" model="account.account.template">
                        <field name="code">1102</field>
                        <field name="name">Debtors</field>
                        <field ref="conf_cas" name="parent_id"/>
                        <field name="type">receivable</field>
                        <field eval="True" name="reconcile"/>
                        <field name="user_type" ref="data_account_type_receivable"/>
                    </record>

                    <record id="conf_ova" model="account.account.template">
                        <field name="code">1103</field>
                        <field name="name">Tax Paid</field>
                        <field ref="conf_cas" name="parent_id"/>
                        <field name="type">other</field>
                        <field name="user_type" ref="data_account_type_asset"/>
                    </record>

                    <record id="conf_bnk" model="account.account.template">
                        <field name="code">1104</field>
                        <field name="name">Bank Current Account</field>
                        <field ref="conf_cas" name="parent_id"/>
                        <field name="type">view</field>
                        <field name="user_type" ref="account_type_asset_view1"/>
                    </record>

                    <record id="conf_o_income" model="account.account.template">
                        <field name="code">1106</field>
                        <field name="name">Opening Income Account</field>
                        <field ref="conf_cas" name="parent_id"/>
                        <field name="type">other</field>
                        <field name="user_type" ref="data_account_type_income"/>
                    </record>

                <record id="conf_cli" model="account.account.template">
                    <field name="code">12</field>
                    <field name="name">Current Liabilities</field>
                    <field ref="conf_bal" name="parent_id"/>
                    <field name="type">view</field>
                    <field name="user_type" ref="account_type_liability_view1"/>
                </record>

                    <record id="conf_a_pay" model="account.account.template">
                        <field name="code">120</field>
                        <field name="name">Creditors</field>
                        <field ref="conf_cli" name="parent_id"/>
                        <field name="type">payable</field>
                        <field eval="True" name="reconcile"/>
                        <field name="user_type" ref="data_account_type_payable"/>
                    </record>

                    <record id="conf_iva" model="account.account.template">
                        <field name="code">121</field>
                        <field name="name">Tax Received</field>
                        <field ref="conf_cli" name="parent_id"/>
                        <field name="type">other</field>
                        <field name="user_type" ref="data_account_type_liability"/>
                    </record>

                    <record id="conf_a_reserve_and_surplus" model="account.account.template">
                        <field name="code">122</field>
                        <field name="name">Reserve and Profit/Loss Account</field>
                        <field ref="conf_cli" name="parent_id"/>
                        <field name="type">other</field>
                        <field eval="True" name="reconcile"/>
                        <field name="user_type" ref="data_account_type_liability"/>
                    </record>

                    <record id="conf_o_expense" model="account.account.template">
                        <field name="code">123</field>
                        <field name="name">Opening Expense Account</field>
                        <field ref="conf_cli" name="parent_id"/>
                        <field name="type">other</field>
                        <field name="user_type" ref="data_account_type_expense"/>
                    </record>

        <!-- Profit and Loss -->

        <record id="conf_gpf" model="account.account.template">
            <field name="code">2</field>
            <field name="name">Profit and Loss</field>
            <field ref="conf_chart0" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="data_account_type_view"/>
        </record>

            <record id="conf_rev" model="account.account.template">
                <field name="code">20</field>
                <field name="name">Revenue</field>
                <field ref="conf_gpf" name="parent_id"/>
                <field name="type">view</field>
                <field name="user_type" ref="account_type_income_view1"/>
            </record>

                <record id="conf_a_sale" model="account.account.template">
                    <field name="code">200</field>
                    <field name="name">Product Sales</field>
                    <field ref="conf_rev" name="parent_id"/>
                    <field name="type">other</field>
                    <field name="user_type" ref="data_account_type_income"/>
                </record>

            <record id="conf_cos" model="account.account.template">
                <field name="code">21</field>
                <field name="name">Cost of Sales</field>
                <field ref="conf_gpf" name="parent_id"/>
                <field name="type">view</field>
                <field name="user_type" ref="account_type_income_view1"/>
            </record>

                <record id="conf_cog" model="account.account.template">
                    <field name="code">210</field>
                    <field name="name">Cost of Goods Sold</field>
                    <field ref="conf_cos" name="parent_id"/>
                    <field name="type">other</field>
                    <field name="user_type" ref="data_account_type_expense"/>
                </record>

            <record id="conf_ovr" model="account.account.template">
                <field name="code">22</field>
                <field name="name">Overheads</field>
                <field ref="conf_gpf" name="parent_id"/>
                <field name="type">view</field>
                <field name="user_type" ref="account_type_expense_view1"/>
            </record>

                <record id="conf_a_expense" model="account.account.template">
                    <field name="code">220</field>
                    <field name="name">Expenses</field>
                    <field ref="conf_ovr" name="parent_id"/>
                    <field name="type">other</field>
                    <field name="user_type" ref="data_account_type_expense"/>
                </record>

                <record id="conf_a_salary_expense" model="account.account.template">
                    <field name="code">221</field>
                    <field name="name">Salary Expenses</field>
                    <field ref="conf_ovr" name="parent_id"/>
                    <field name="type">other</field>
                    <field name="user_type" ref="data_account_type_expense"/>
                </record>

        <!-- Taxes -->
        <!-- TAX Code Definitions -->

        <!-- Invoiced TAX -->

        <record id="tax_code_chart_root" model="account.tax.code.template">
            <field name="name">Plan Fees </field>
        </record>

            <record id="tax_code_balance_net" model="account.tax.code.template">
                <field name="name">Tax Balance to Pay</field>
                <field name="parent_id" ref="tax_code_chart_root"/>
            </record>

            <!-- Input TAX -->
            <record id="tax_code_input" model="account.tax.code.template">
                <field name="name">Tax Received</field>
                <field name="parent_id" ref="tax_code_balance_net"/>
                <field eval="-1" name="sign"/>
            </record>

                <record id="tax_code_input_S" model="account.tax.code.template">
                    <field name="name">Tax Received Rate S (15%)</field>
                    <field name="parent_id" ref="tax_code_input"/>
                </record>

                <record id="tax_code_input_R" model="account.tax.code.template">
                    <field name="name">Tax Received Rate R (5%)</field>
                    <field name="parent_id" ref="tax_code_input"/>
                </record>

                <record id="tax_code_input_X" model="account.tax.code.template">
                    <field name="name">Tax Received Rate X (Exempt)</field>
                    <field name="parent_id" ref="tax_code_input"/>
                </record>

                <record id="tax_code_input_O" model="account.tax.code.template">
                    <field name="name">Tax Received Rate O (Out of scope)</field>
                    <field name="parent_id" ref="tax_code_input"/>
                </record>

            <!-- Output TAX -->

            <record id="tax_code_output" model="account.tax.code.template">
                <field name="name">Tax Paid</field>
                <field name="parent_id" ref="tax_code_balance_net"/>
            </record>

                <record id="tax_code_output_S" model="account.tax.code.template">
                    <field name="name">Tax Paid Rate S (15%)</field>
                    <field name="parent_id" ref="tax_code_output"/>
                </record>

                <record id="tax_code_output_R" model="account.tax.code.template">
                    <field name="name">Tax Paid Rate R (5%)</field>
                    <field name="parent_id" ref="tax_code_output"/>
                </record>

                <record id="tax_code_output_X" model="account.tax.code.template">
                    <field name="name">Tax Paid Rate X (Exempt)</field>
                    <field name="parent_id" ref="tax_code_output"/>
                </record>

                <record id="tax_code_output_O" model="account.tax.code.template">
                    <field name="name">Tax Paid Rate O (Out of scope)</field>
                    <field name="parent_id" ref="tax_code_output"/>
                </record>


            <!-- Invoiced Base of TAX -->

            <!-- Purchases -->

            <record id="tax_code_base_net" model="account.tax.code.template">
                <field name="name">Tax Bases</field>
                <field name="parent_id" ref="tax_code_chart_root"/>
            </record>

                <record id="tax_code_base_purchases" model="account.tax.code.template">
                    <field name="name">Taxable Purchases Base</field>
                    <field name="parent_id" ref="tax_code_base_net"/>
                </record>

                    <record id="tax_code_purch_S" model="account.tax.code.template">
                        <field name="name">Taxable Purchases Rated S (15%)</field>
                        <field name="parent_id" ref="tax_code_base_purchases"/>
                    </record>

                    <record id="tax_code_purch_R" model="account.tax.code.template">
                        <field name="name">Taxable Purchases Rated R (5%)</field>
                        <field name="parent_id" ref="tax_code_base_purchases"/>
                    </record>

                    <record id="tax_code_purch_X" model="account.tax.code.template">
                        <field name="name">Taxable Purchases Type X (Exempt)</field>
                        <field name="parent_id" ref="tax_code_base_purchases"/>
                    </record>

                    <record id="tax_code_purch_O" model="account.tax.code.template">
                        <field name="name">Taxable Purchases Type O (Out of scope)</field>
                        <field name="parent_id" ref="tax_code_base_purchases"/>
                    </record>

                <!-- Sales -->

                <record id="tax_code_base_sales" model="account.tax.code.template">
                    <field name="name">Base of Taxable Sales</field>
                    <field name="parent_id" ref="tax_code_base_net"/>
                </record>

                    <record id="tax_code_sales_S" model="account.tax.code.template">
                        <field name="name">Taxable Sales Rated S (15%)</field>
                        <field name="parent_id" ref="tax_code_base_sales"/>
                    </record>

                    <record id="tax_code_sales_R" model="account.tax.code.template">
                        <field name="name">Taxable Sales Rated R (5%)</field>
                        <field name="parent_id" ref="tax_code_base_sales"/>
                    </record>

                    <record id="tax_code_sales_X" model="account.tax.code.template">
                        <field name="name">Taxable Sales Type X (Exempt)</field>
                        <field name="parent_id" ref="tax_code_base_sales"/>
                    </record>

                    <record id="tax_code_sales_O" model="account.tax.code.template">
                        <field name="name">Taxable Sales Type O (Out of scope)</field>
                        <field name="parent_id" ref="tax_code_base_sales"/>
                    </record>

        <record id="configurable_chart_template" model="account.chart.template">
            <field name="name">Configurable Account Chart Template</field>
            <field name="account_root_id" ref="conf_chart0"/>
            <field name="tax_code_root_id" ref="tax_code_chart_root"/>
            <field name="bank_account_view_id" ref="conf_bnk"/>
            <field name="property_account_receivable" ref="conf_a_recv"/>
            <field name="property_account_payable" ref="conf_a_pay"/>
            <field name="property_account_expense_categ" ref="conf_a_expense"/>
            <field name="property_account_income_categ" ref="conf_a_sale"/>
            <field name="property_account_income_opening" ref="conf_o_income"/>
            <field name="property_account_expense_opening" ref="conf_o_expense"/>
            <field name="complete_tax_set" eval="False"/>
        </record>

         <!-- VAT Codes -->
        <!-- Purchases + Output VAT -->

        <record id="otaxs" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">OTAX S</field>
            <field eval="0.15" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_ova"/>
            <field name="account_paid_id" ref="conf_ova"/>
            <field name="base_code_id" ref="tax_code_purch_S"/>
            <field name="tax_code_id" ref="tax_code_output_S"/>
            <field name="ref_base_code_id" ref="tax_code_purch_S"/>
            <field name="ref_tax_code_id" ref="tax_code_output_S"/>
            <field name="type_tax_use">purchase</field>
        </record>

        <record id="otaxr" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">OTAX R</field>
            <field eval="0.05" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_ova"/>
            <field name="account_paid_id" ref="conf_ova"/>
            <field name="base_code_id" ref="tax_code_purch_R"/>
            <field name="tax_code_id" ref="tax_code_output_R"/>
            <field name="ref_base_code_id" ref="tax_code_purch_R"/>
            <field name="ref_tax_code_id" ref="tax_code_output_R"/>
            <field name="type_tax_use">purchase</field>
        </record>

        <record id="otaxx" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">OTAX X</field>
            <field eval="0.0" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_ova"/>
            <field name="account_paid_id" ref="conf_ova"/>
            <field name="base_code_id" ref="tax_code_purch_X"/>
            <field name="tax_code_id" ref="tax_code_output_X"/>
            <field name="ref_base_code_id" ref="tax_code_purch_X"/>
            <field name="ref_tax_code_id" ref="tax_code_output_X"/>
            <field name="type_tax_use">purchase</field>
        </record>

        <record id="otaxo" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">OTAX O</field>
            <field eval="0.0" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_ova"/>
            <field name="account_paid_id" ref="conf_ova"/>
            <field name="base_code_id" ref="tax_code_purch_O"/>
            <field name="tax_code_id" ref="tax_code_output_O"/>
            <field name="ref_base_code_id" ref="tax_code_purch_O"/>
            <field name="ref_tax_code_id" ref="tax_code_output_O"/>
            <field name="type_tax_use">purchase</field>
        </record>

        <!-- Sales + Input VAT -->

        <record id="itaxs" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">ITAX S</field>
            <field eval="0.15" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_iva"/>
            <field name="account_paid_id" ref="conf_iva"/>
            <field name="base_code_id" ref="tax_code_sales_S"/>
            <field name="tax_code_id" ref="tax_code_input_S"/>
            <field name="ref_base_code_id" ref="tax_code_sales_S"/>
            <field name="ref_tax_code_id" ref="tax_code_input_S"/>
            <field name="type_tax_use">sale</field>
        </record>

        <record id="itaxr" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">ITAX R</field>
            <field eval="0.05" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_iva"/>
            <field name="account_paid_id" ref="conf_iva"/>
            <field name="base_code_id" ref="tax_code_sales_R"/>
            <field name="tax_code_id" ref="tax_code_input_R"/>
            <field name="ref_base_code_id" ref="tax_code_sales_R"/>
            <field name="ref_tax_code_id" ref="tax_code_input_R"/>
            <field name="type_tax_use">sale</field>
        </record>

        <record id="itaxx" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">ITAX X</field>
            <field eval="0.0" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_iva"/>
            <field name="account_paid_id" ref="conf_iva"/>
            <field name="base_code_id" ref="tax_code_sales_X"/>
            <field name="tax_code_id" ref="tax_code_input_X"/>
            <field name="ref_base_code_id" ref="tax_code_sales_X"/>
            <field name="ref_tax_code_id" ref="tax_code_input_X"/>
            <field name="type_tax_use">sale</field>
        </record>

        <record id="itaxo" model="account.tax.template">
            <field name="chart_template_id" ref="configurable_chart_template"/>
            <field name="name">ITAX O</field>
            <field eval="0.0" name="amount"/>
            <field name="type">percent</field>
            <field name="account_collected_id" ref="conf_iva"/>
            <field name="account_paid_id" ref="conf_iva"/>
            <field name="base_code_id" ref="tax_code_sales_O"/>
            <field name="tax_code_id" ref="tax_code_input_O"/>
            <field name="ref_base_code_id" ref="tax_code_sales_O"/>
            <field name="ref_tax_code_id" ref="tax_code_input_O"/>
            <field name="type_tax_use">sale</field>
        </record>



        <!-- = = = = = = = = = = = = = = = -->
         <!-- Fiscal Mapping Templates     -->
        <!-- = = = = = = = = = = = = = = = -->


        <record id="fiscal_position_normal_taxes_template1" model="account.fiscal.position.template">
            <field name="name">Normal Taxes</field>
            <field name="chart_template_id" ref="configurable_chart_template"/>
        </record>

        <record id="fiscal_position_tax_exempt_template2" model="account.fiscal.position.template">
            <field name="name">Tax Exempt</field>
            <field name="chart_template_id" ref="configurable_chart_template"/>
        </record>

        <!-- = = = = = = = = = = = = = = = -->
        <!-- Fiscal Position Tax Templates -->
        <!-- = = = = = = = = = = = = = = = -->


        <record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_normal_taxes_template1"/>
            <field name="tax_src_id" ref="itaxs"/>
            <field name="tax_dest_id" ref="otaxs"/>
        </record>

        <record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_tax_exempt_template2"/>
            <field name="tax_src_id" ref="itaxx"/>
            <field name="tax_dest_id" ref="otaxx"/>
        </record>


        <!--  Assigned Default Taxes For Different Account -->

        <record id="conf_a_sale" model="account.account.template">
            <field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
        </record>

        <record id="conf_a_expense" model="account.account.template">
            <field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
        </record>

        <record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
            <field name="name">Set Your Accounting Options</field>
            <field name="action_id" ref="account.action_wizard_multi_chart"/>
            <field name="type">automatic</field>
        </record>


    </data>
</openerp>
