From 0ec14d00cd92dd29cd3f1e568f1be33b9b11fba1 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Wed, 24 Aug 2011 17:20:47 +0530 Subject: [PATCH] [ADD] account: Added a tree view to see hierarchy of account reports. bzr revid: uco@tinyerp.com-20110824115047-rce4wzv0e58gexec --- addons/account/account.py | 3 ++- addons/account/account_view.xml | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 8d0a6479b73..6723cdfe2c1 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2622,7 +2622,8 @@ class account_report(osv.osv): ],'Report Type'), 'account_ids': fields.many2many('account.account', 'account_account_report', 'report_line_id', 'account_id', 'Accounts'), 'note': fields.text('Notes'), - 'account_report_id': fields.many2one('account.report', 'Account Report'), + 'account_report_id': fields.many2one('account.report', 'Account Report'), + 'child_ids': fields.one2many('account.report','parent_id','Children'), } _defaults = { diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 93e6bc0a996..28e0aaf6b4e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2732,9 +2732,8 @@ action = self.pool.get('res.config').next(cr, uid, [], context) tree - - + @@ -2774,5 +2773,30 @@ action = self.pool.get('res.config').next(cr, uid, [], context) + + account.report.hierarchy + account.report + tree + child_ids + + + + + + + + + + + Account Reports Hierarchy + account.report + tree + + [('parent_id','=',False)] + + + +