Inheritance openerp从报表\帐户\公用项继承

Inheritance openerp从报表\帐户\公用项继承,inheritance,openerp-7,Inheritance,Openerp 7,我正在为资产负债表创建jasper报告,我看到了以下文件: addons\account\report\account\u financial\u report.py有一个方法可以获取报表所需的所有信息,因此我想创建一个模块,该模块可以获取该方法的get\u行,并可以根据该值生成新报表 可能吗?该文件包含以下内容: class report_account_common(report_sxw.rml_parse, common_report_header): def __init__(s

我正在为资产负债表创建jasper报告,我看到了以下文件: addons\account\report\account\u financial\u report.py有一个方法可以获取报表所需的所有信息,因此我想创建一个模块,该模块可以获取该方法的get\u行,并可以根据该值生成新报表

可能吗?该文件包含以下内容:

class report_account_common(report_sxw.rml_parse, common_report_header):
    def __init__(self, cr, uid, name, context=None):
        super(report_account_common, self).__init__(cr, uid, name, context=context)
        self.localcontext.update( {
            'get_lines': self.get_lines,
            'time': time,
            'get_fiscalyear': self._get_fiscalyear,
            'get_account': self._get_account,
            'get_start_period': self.get_start_period,
            'get_end_period': self.get_end_period,
            'get_filter': self._get_filter,
            'get_start_date':self._get_start_date,
            'get_end_date':self._get_end_date,
            'get_target_move': self._get_target_move,
        })
        self.context = context

    def set_context(self, objects, data, ids, report_type=None):
        new_ids = ids
        if (data['model'] == 'ir.ui.menu'):
            new_ids = 'chart_account_id' in data['form'] and [data['form']['chart_account_id']] or []
            objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
        return super(report_account_common, self).set_context(objects, data, new_ids, report_type=report_type)

    def get_lines(self, data):
        lines = []
        account_obj = self.pool.get('account.account')
         ..... more code ...... 
所以我想调用get_lines方法并处理返回的值


提前感谢。

您可以从account\u financial\u report继承,然后调用以下函数:

def yourFunction(data):

--- your code----

return super(account_financial_report, self).get_lines(data)
调用函数以获取所需的值