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
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
2
Respostes
8933
Vistes
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
1
d’ag. 21
|
2059 | ||
|
0
de gen. 17
|
3947 | ||
|
0
de set. 16
|
3872 | ||
|
2
de març 15
|
5019 | ||
|
0
de març 15
|
3455 |