diff --git a/addons/account/account_financial_report.py b/addons/account/account_financial_report.py index 28b5e08dc99..1d9a4a794eb 100644 --- a/addons/account/account_financial_report.py +++ b/addons/account/account_financial_report.py @@ -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):