diff --git a/addons/account/account.py b/addons/account/account.py
index f022df53618..e2d8fc4c2ed 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -122,6 +122,16 @@ class account_account_type(osv.osv):
'partner_account': fields.boolean('Partner account'),
'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True),
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign on Reports', required=True, help='Allows you to change the sign of the balance amount displayed in the reports, so that you can see positive figures instead of negative ones in expenses accounts.'),
+ 'report_type':fields.selection([
+ ('none','/'),
+ ('income','Profilt & Loss (Income Accounts)'),
+ ('expanse','Profilt & Loss (Expanse Accounts)'),
+ ('asset','Balance Sheet (Assets Accounts)'),
+ ('liabilities','Balance Sheet (Liabilities Accounts)')
+ ],'Type Heads', select=True, readonly=False, help="According value related accounts will be display on respective reports (Balance Sheet Profit & Loss Account)"),
+ 'parent_id':fields.many2one('account.account.type', 'Parent Type', required=False),
+ 'child_ids':fields.one2many('account.account.type', 'parent_id', 'Child Types', required=False),
+ 'note': fields.text('Description'),
}
_defaults = {
'close_method': lambda *a: 'none',
@@ -129,6 +139,15 @@ class account_account_type(osv.osv):
'sign': lambda *a: 1,
}
_order = "sequence"
+
+ def _check_recursion(self, cr, uid, ids):
+ #TODO: Need to check for recusrion
+ return True
+
+ _constraints = [
+ (_check_recursion, 'Error ! You can not create recursive types.', ['parent_id'])
+ ]
+
account_account_type()
def _code_get(self, cr, uid, context={}):
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 570dfbf8ceb..b66d344973b 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -467,12 +467,24 @@
form