Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1519 Lượt xem

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']

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
I need this too

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 6 22
11877
2
thg 3 15
7189
1
thg 10 24
1579
1
thg 2 22
3385
1
thg 7 24
7140