我的报告文件包含
class AccountInvoice_Report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(AccountInvoice_Report, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'cr':cr,
'uid': uid,
'get_address': self.get_address,
})
我写了 get_address 函数。当我在我的 mako 文件中调用该函数时
<% get_address() %>
然后它给出错误为
File "memory:0xb23c67ccL", line 208, in render_body
<% get_address()%>
TypeError: 'Undefined' object is not callable
我在做文件定义或调用函数时犯了什么错误。