<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- Account Templates-->
        <record id="chart0" model="account.account.template">
            <field name="code">0</field>
            <field name="name">Account Chart UK</field>
            <field eval="0" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <!-- Balance Sheet -->
        <record id="bal" model="account.account.template">
            <field name="code">1</field>
            <field name="name">Balance Sheet</field>
            <field ref="chart0" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record model="account.account.template" id="liabilities_view">
            <field name="name">Liabilities</field>
            <field name="code">11</field>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_liability_view"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="bal"/>
        </record>

        <record id="cli" model="account.account.template">
            <field name="code">110</field>
            <field name="name">Current Liabilities</field>
            <field ref="liabilities_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_liability_view"/>
        </record>

        <record id="a_pay" model="account.account.template">
            <field name="code">1111</field>
            <field name="name">Creditors</field>
            <field ref="cli" name="parent_id"/>
            <field name="type">payable</field>
            <field eval="True" name="reconcile"/>
            <field name="user_type" ref="account_type_liability"/>
        </record>

        <record id="iva" model="account.account.template">
            <field name="code">1112</field>
            <field name="name">Input VAT</field>
            <field ref="cli" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_liability"/>
        </record>

        <record id="a_reserve_and_surplus" model="account.account.template">
            <field name="code">1113</field>
            <field name="name">Reserve and Profit/Loss Account</field>
            <field ref="cli" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_liability"/>
        </record>

        <record model="account.account.template" id="assets_view">
            <field name="name">Assets</field>
            <field name="code">10</field>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_asset_view"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="bal"/>
        </record>

        <record id="fas" model="account.account.template">
            <field name="code">100</field>
            <field name="name">Fixed Assets</field>
            <field ref="assets_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_asset_view"/>
        </record>

        <record id="xfa" model="account.account.template">
            <field name="code">1000</field>
            <field name="name">Fixed Asset Account</field>
            <field ref="fas" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_asset"/>
        </record>

        <record id="nca" model="account.account.template">
            <field name="code">101</field>
            <field name="name">Net Current Assets</field>
            <field ref="assets_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_asset_view"/>
        </record>

        <record id="cas" model="account.account.template">
            <field name="code">1100</field>
            <field name="name">Current Assets</field>
            <field ref="nca" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_asset_view"/>
        </record>

        <record id="stk" model="account.account.template">
            <field name="code">11001</field>
            <field name="name">Purchased Stocks</field>
            <field ref="cas" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_asset"/>
        </record>

        <record id="a_recv" model="account.account.template">
            <field name="code">11002</field>
            <field name="name">Debtors</field>
            <field ref="cas" name="parent_id"/>
            <field name="type">receivable</field>
            <field eval="True" name="reconcile"/>
            <field name="user_type" ref="account_type_asset"/>
        </record>

        <record id="ova" model="account.account.template">
            <field name="code">11003</field>
            <field name="name">Output VAT</field>
            <field ref="cas" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_asset"/>
        </record>

        <record id="bnk" model="account.account.template">
            <field name="code">11004</field>
            <field name="name">Bank Current Account</field>
            <field ref="cas" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_cash"/>
        </record>

        <record id="cash" model="account.account.template">
            <field name="code">11005</field>
            <field name="name">Cash</field>
            <field ref="cas" name="parent_id"/>
            <field name="type">liquidity</field>
            <field name="user_type" ref="account_type_cash"/>
        </record>

        <!-- Profit and Loss -->

        <record id="gpf" model="account.account.template">
            <field name="code">2</field>
            <field name="name">Profit and Loss</field>
            <field ref="chart0" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record model="account.account.template" id="income_view">
            <field name="name">Income</field>
            <field name="code">20</field>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_income_view"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="gpf"/>
        </record>

        <record model="account.account.template" id="income_fx_income">
            <field name="name">Foreign Exchange Gain</field>
            <field name="code">X201</field>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_income"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="income_view"/>
        </record>

        <record id="rev" model="account.account.template">
            <field name="code">200</field>
            <field name="name">Revenue</field>
            <field ref="income_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_income_view"/>
        </record>

        <record id="a_sale" model="account.account.template">
            <field name="code">2001</field>
            <field name="name">Product Sales</field>
            <field ref="rev" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_income"/>
        </record>

        <record model="account.account.template" id="expense_view">
            <field name="name">Expense</field>
            <field name="code">21</field>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_expense_view"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="gpf"/>
        </record>

        <record id="cos" model="account.account.template">
            <field name="code">210</field>
            <field name="name">Cost of Sales</field>
            <field ref="expense_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_expense_view"/>
        </record>

        <record id="cog" model="account.account.template">
            <field name="code">2100</field>
            <field name="name">Cost of Goods Sold</field>
            <field ref="cos" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_expense"/>
        </record>

        <record id="ovr" model="account.account.template">
            <field name="code">211</field>
            <field name="name">Overheads</field>
            <field ref="expense_view" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="acct_type_expense_view"/>
        </record>

        <record id="a_expense" model="account.account.template">
            <field name="code">2110</field>
            <field name="name">Expenses</field>
            <field ref="ovr" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_expense"/>
        </record>

        <record model="account.account.template" id="income_fx_expense">
            <field name="name">Foreign Exchange Loss</field>
            <field name="code">2111</field>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_expense"/>
            <field name="reconcile" eval="False"/>
            <field name="parent_id" ref="ovr"/>
        </record>

        <record id="a_salary_expense" model="account.account.template">
            <field name="code">2112</field>
            <field name="name">Salary Expenses</field>
            <field ref="ovr" name="parent_id"/>
            <field name="type">other</field>
            <field name="user_type" ref="account_type_expense"/>
        </record>
    </data>
</openerp>
