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

Error: \'Undefined\' object is not callable\n'

By
Drees Far
on 8/21/15, 8:58 AM 716 views

Hello guys!!

Please who can help:

My python functions:


def __init__(self, cr, uid, name, context):

super(journal_paie, self).__init__(cr, uid, name, context)

self.localcontext.update({

'get_lines': self.get_lines,

'cr':cr,

'uid':1,

'ctxt':context,

})

def get_lines(self,company_id,cr,uid, context=None):

print ('first test')

if not context:

context = None

ret = []

obj = self.pool.get('hr.payslip.line')

obj_ids = obj.search(cr, uid, [('company_id', '=', company_id)])

res = obj.read(cr, uid, obj_ids, ['id', 'employee_id'], context)

print res['employee_id']


And i call my unction get_lines in my mako file:


%for item in get_lines(company_id):

<td width=31.9 style='width:31.9pt;border:none;border-bottom:solid windowtext 1.0pt;

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

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

text-align:center;line-height:normal'><b><span style='font-size:8.0pt;

font-family:"Arial","sans-serif";color:black'>${item['employee_id']}</span></b></p>

</td>

%endfor

Please, i need an answer who can help me.

Thanks a lot and Regards.

But why??

Drees Far
on 8/21/15, 9:52 AM

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: 8/21/15, 8:58 AM
Seen: 716 times
Last updated: 8/21/15, 9:52 AM