[REF] account: added docstring in few methods of account.financial.report

bzr revid: qdp-launchpad@openerp.com-20130211125056-vefj0an37hdz4r37
This commit is contained in:
Quentin (OpenERP) 2013-02-11 13:50:56 +01:00
parent d225c56353
commit 8652d0de70
1 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,8 @@ class account_financial_report(osv.osv):
_description = "Account Report"
def _get_level(self, cr, uid, ids, field_name, arg, context=None):
'''Returns a dictionary with key=the ID of a record and value = the level of this
record in the tree structure.'''
res = {}
for report in self.browse(cr, uid, ids, context=context):
level = 0
@ -48,6 +50,8 @@ class account_financial_report(osv.osv):
return res
def _get_children_by_order(self, cr, uid, ids, context=None):
'''returns a dictionary with the key= the ID of a record and value = all its children,
computed recursively, and sorted by sequence. Ready for the printing'''
res = []
for id in ids:
res.append(id)
@ -56,6 +60,12 @@ class account_financial_report(osv.osv):
return res
def _get_balance(self, cr, uid, ids, field_names, args, context=None):
'''returns a dictionary with key=the ID of a record and value=the balance amount
computed for this record. If the record is of type :
'accounts' : it's the sum of the linked accounts
'account_type' : it's the sum of leaf accoutns with such an account_type
'account_report' : it's the amount of the related report
'sum' : it's the sum of the children of this record (aka a 'view' record)'''
account_obj = self.pool.get('account.account')
res = {}
for report in self.browse(cr, uid, ids, context=context):