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

    <data noupdate="1">

        <!-- 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 id="fas" model="account.account.template">
        	<field name="code">10</field>
            <field name="name">Fixed Assets</field>
            <field ref="bal" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record id="xfa" model="account.account.template">
        	<field name="code">100</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">11</field>
            <field name="name">Net Current Assets</field>
            <field ref="bal" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

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

        <record id="stk" model="account.account.template">
            <field name="code">1101</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">1102</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_receivable"/>
        </record>

        <!-- <record id="account.property_account_receivable" model="ir.property">
            <field eval="'account.account,'+str(a_recv)" name="value"/>
        </record> -->

        <record id="ova" model="account.account.template">
        	<field name="code">1103</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_tax"/>
        </record>

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

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

        <record id="cli" model="account.account.template">
        	<field name="code">111</field>
            <field name="name">Current Liabilities</field>
            <field ref="nca" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_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_payable"/>
        </record>

        <!-- <record id="account.property_account_payable" model="ir.property">
            <field eval="'account.account,'+str(a_pay)" name="value"/>
        </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_tax"/>
        </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 id="rev" model="account.account.template">
			<field name="code">20</field>        
            <field name="name">Revenue</field>
            <field ref="gpf" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record id="a_sale" model="account.account.template">
            <field name="code">200</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 id="account.property_account_income_categ" model="ir.property">
            <field eval="'account.account,'+str(a_sale)" name="value"/>
        </record> -->

        <record id="cos" model="account.account.template">
        	<field name="code">21</field>
            <field name="name">Cost of Sales</field>
            <field ref="gpf" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record id="cog" model="account.account.template">
            <field name="code">210</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">22</field>
            <field name="name">Overheads</field>
            <field ref="gpf" name="parent_id"/>
            <field name="type">view</field>
            <field name="user_type" ref="account_type_view"/>
        </record>

        <record id="a_expense" model="account.account.template">
            <field name="code">220</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 id="account.property_account_expense_categ" model="ir.property">
            <field eval="'account.account,'+str(a_expense)" name="value"/>
        </record> -->
        

    </data>
</openerp>
