跳至內容
選單
此問題已被標幟
1 回覆
4139 瀏覽次數

Hello every body,

I trying to call function in mako file to create report with webkit but when I call function from python fill in mako this message appeare for me TypeError: 'Undefined' object is not callable so I will be thankful alot if any one help me

thanks alot

頭像
捨棄
最佳答案

In mako, call the function %
                %for l in get_lines(o.order_line):
OR 
            <% lines = get_lines(o.order_line)

In py file, 

class sale_order_report(report_sxw.rml_parse):
    def __init__(self, cr, uid, name, context):
        super(grid_report, self).__init__(cr, uid, name, context=context)
        self.localcontext.update({
            'time': time,
            'get_lines': self._get_lines,
        })

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
10月 16
30999
1
9月 15
3720
1
6月 15
686
0
4月 15
523
2
4月 15
691