콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3399 화면

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??

관련 게시물 답글 화면 활동
2
5월 22
33940
0
3월 19
4058
0
1월 19
5103
4
2월 24
12328
0
1월 18
3960