我的報告文件中包含無法調用Python函數中的Webkit報告的OpenERP
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功能。當我調用該函數在我的真子文件
<% get_address() %>
然後它給了錯誤的
File "memory:0xb23c67ccL", line 208, in render_body
<% get_address()%>
TypeError: 'Undefined' object is not callable
我在做什麼文件錯誤定義或調用函數。
這是基本的東西。我已包括它。如果我沒有,那麼錯誤將會不同。請檢查錯誤。 –
如果你不導入文件夾,錯誤將會是相同的。我之前面臨同樣的問題,因爲我忘記了包含它。你有沒有檢查你的自定義分析器是否被調用,放置斷點並檢查。 – sajadkk
能否詳細說明自定義解析器檢查.. –