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

I need to use as a base the sum of some previous payroll rule categories.


I tried the following code but it doesn't add anything:

result = payslip._sum_category('ALW', payslip.date_from, to_date=payslip.date_to)


Additionally, I tried the following code but I can only access the salary rules and not the rule categories:

payslips = contract.env['hr.payslip'].search([

('employee_id', '=', contract.employee_id.id),

('date_from', '>=', payslip.date_from),

('date_to', '>=', payslip.date_to),

('company_id', '=', contract.company_id.id),

])

result= month_payslips._get_line_values(['ALW', vals_list=['total'], compute_sum=True)['ALW']['sum']['total']

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
I need this too

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to create Salary rules? แก้ไขแล้ว
2
มิ.ย. 22
11877
2
มี.ค. 15
7192
Server action hr.work.entry แก้ไขแล้ว
1
ต.ค. 24
1586
1
ก.พ. 22
3387
1
ก.ค. 24
7144