Dear All,
I have to show the number of remaining leave days on the payslip. Can anyone tell me which field or which calculation I have to add to the form so that it is shown/calculated?
Thank in advance!
Philipp
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Dear All,
I have to show the number of remaining leave days on the payslip. Can anyone tell me which field or which calculation I have to add to the form so that it is shown/calculated?
Thank in advance!
Philipp
You can create a related field on Payslip form and the value should be employee_id.remaining_leaves
remaining_leaves = fields.Float(related='employee_id.remaining_leaves')
or
do as per the screenshots:-
settings->databasestructure->fields
settings->userinterface->view payslip form external id : hr_payroll.view_hr_payslip_form
Put the field name x_remaining_leaves
This will make
Hi Philipp,
You can show the remaining leaves in the payslip using create a new rule.
Create a new rule with name "remaining leave days" and create a new category for it.
Conditions : Always True
Computation
Amount Type: Python code
Python Code : result = employee.remaining_leaves.
just add this rule into every salary structure.
After computing we can get the remaining leaves in the payslip,
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lip 15
|
5828 | ||
|
0
maj 20
|
3433 | ||
leaves and salary calculation.
Rozwiązane
|
|
21
lut 18
|
35019 | |
|
1
mar 15
|
6085 | ||
Unpaid Leaves Deduction not working
Rozwiązane
|
|
16
lis 23
|
23460 |
Dear Nikhil,
Thanks for the idea; but then it is shown as one of the lines in the payslip. I would prefer to have it as a field in the header, e.g. next to the periode.
Any further ideas.
Thanks and regards,
Philipp
Ya, just try the method that said by Mr. Hilar.