Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

Hello. I'm using Odoo V13.0, and I want to write a salary rule that allows me to calculate employee's working age and add this money to his/her payslip. 

What I'm thinking is this:

  • First, in salary rule range, I want to calculate the the working age of an employee based on his/her contract.start_date (my problem is that I have no idea how could I get this date in code)

  • After having this working age, I want to set some conditions using it, i.e. if working_age (again, I don't know how to get this variable as well) is less than 1 year, the result is the result, no changes; if it's longer than 1 year, I want to add some money to his/her salary, etc.

How can I write this salary rule? Thanks. 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
sty 17
3692
1
lut 24
2341
1
sty 24
1634
1
lip 23
4050
0
lip 18
3634