Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4150 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 10 16
31002
1
thg 9 15
3722
1
thg 6 15
688
0
thg 4 15
525
2
thg 4 15
691