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

Good Morning my friends

Please, who can tell me how can i call a function that i have defined in my python file in the mako file.

Thanks a lot in advance

Regards.

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

Hi,

You can link the mako template with python parser file and call the function in mako template like we do in case of rml reports. The difference is in the syntax, which you may understand by referring the following module. Please refer the module and try to understand how the mako template and parser linked. You can see many python function called in that.

https://apps.openerp.com/apps/modules/8.0/account_financial_report_webkit/ 

Also download this file to get an understanding of syntaxes in mako templates:

https://drive.google.com/file/d/0B9fGr6w-dfLWSF9ic3NFeTM5dDQ/edit 


Ả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
30992
1
thg 12 15
4435
0
thg 11 15
3566
3
thg 11 15
12802
1
thg 9 15
3714