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

In Odoo12 CE, Under Payroll module we had added one custom function. In this function, we had tried search function as well as execute query option both returns none as result. But when we execute the same in pgadmin, it is listing the value.


# ------------------- Using SQL Query -------------------
if p_line_id_esi:
payslip_gross_sql_1 = ''' select total::int from hr_payslip_line where employee_id = %s and slip_id = %s and code ='GROSS' '''%(str(payslip.employee_id.id),str(payslip.id))
self.env.cr.execute(payslip_gross_sql_1)
payslip_id_gross_1 = self.env.cr.fetchone()

# ------------------- Using search function -------------------
p_payslip_line_id_test =self.env['hr.payslip.line'].search([('slip_id','=',664808)])

We are using Odoo12CE, Postgres 10 and Ubuntu 16

아바타
취소
관련 게시물 답글 화면 활동
0
9월 20
3939
0
5월 20
2374
0
7월 19
4516
5
8월 22
13833
0
8월 20
2592