Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

object is not callable in mako for OpenERP

By
Drees Far
on 10/29/15, 9:29 AM 287 views

Hello my friends!!

I am trying to call a python function in a mako file.

I have tried but i have got an error.

python:

def get_date(self, context=None): 

obj = {}

res_list=[]

obj['date_from'] = datetime.now().strftime('%Y-%m-%d')

res_list.append(obj)

return res_list

Mako:

%for item in get_date():

<tr style='height:8.5pt'>

<td width=214 style='width:160.5pt;border-left:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;

background:#FCE4D6;padding:0cm 3.5pt 0cm 3.5pt;height:8.5pt'>

<p class=MsoNormal align=right style='margin-bottom:0cm;margin-bottom:.0001pt;

text-align:right;text-indent:8.05pt;line-height:normal'><b><span

style='font-size:8.0pt;font-family:"Arial","sans-serif";color:black'>${item.date_from}</span></b></p>

</td>

</tr>

%endfor

Please, need an answer

Regards

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/29/15, 9:29 AM
Seen: 287 times
Last updated: 11/21/15, 6:09 AM