Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3345 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ค. 22
33824
0
มี.ค. 19
3990
0
ม.ค. 19
5024
4
ก.พ. 24
12237
0
ม.ค. 18
3889