Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4162 มุมมอง

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,
        })

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ต.ค. 16
31005
1
ก.ย. 15
3723
1
มิ.ย. 15
695
0
เม.ย. 15
531
2
เม.ย. 15
691