تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4412 أدوات العرض

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
سبتمبر 20
3926
0
مايو 20
2363
0
يوليو 19
4506
5
أغسطس 22
13821
0
أغسطس 20
2590