I am adding new deduction salary rules. I want to consider leaves in 'hr.holidays', and 'resource.calendar.leaves' models. However, I can't decide whether to deduce salary based on some leave record. I have no clear way to know whether it is a paid or non-paid leave.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
2
Odpowiedzi
8984
Widoki
Use the following code in Python Expression:
result=worked_days.Unpaid and worked_days.Unpaid.number_of_days or False
and them add the following code in Python Code:
result=-(contract.wage/30)*worked_days.Unpaid.number_of_days
Use the following code to get the unpaid leaves deductions.
result=-(contract.wage/31)*worked_days.Unpaid.number_of_days
Podoba Ci się ta dyskusja? Dołącz do niej!
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ść | |
---|---|---|---|---|
|
1
sie 21
|
2076 | ||
|
0
sty 17
|
3989 | ||
|
0
wrz 16
|
3890 | ||
|
2
mar 15
|
5053 | ||
|
0
mar 15
|
3480 |