İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1490 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt
I need this too

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Haz 22
11865
2
Mar 15
7180
1
Eki 24
1559
1
Şub 22
3366
1
Tem 24
7128