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

Hello everybody.

I have a calculated field to get the seniority of an employee, using this code.


fecha=datetime.date.today()

for record in self:

Antiguedad= dateutil.relativedelta.relativedelta(fecha,record['x_studio_fecha_de_ingreso']).years

Antiguedad_mes= dateutil.relativedelta.relativedelta(fecha,record['x_studio_fecha_de_ingreso']).months

record['x_studio_antiguedad'] = f"{Antiguedad} Años {Antiguedad_mes} Meses"


The problem is that this field is calculated well but I need it to be updated daily.

I think I need to use an automated action but i don´t sure.

Any suggestions on how to do it?

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
gru 24
1901
0
gru 24
1220