Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
10197 Visualizzazioni

January, the 14th 2020, I have created a month allocation like this:

Allocation Type : Accrual Allocation
Until :

Add 1,00 Day every Month

But at the 1st day of the month (Febuary 1st), this leave allocation is not added to the employees.

Is this leave allocation added at the first day of the month or every month at the created date (in this example 14th day of the month)?

Avatar
Abbandona
Risposta migliore

Hello,
Activate Developer mode from general settings.
Go to Settings>Technical>Scheduled Actions.

Check for this scheduled action, this action is responsible for doing this job.

Screenshot from 2020-02-04 11-42-31.png

Here you can see the Next Execution Date, and interval as 'Execute Every'.

[Update]
So when this action runs based on the schedule, it will call the _update_accrual() method.
Screenshot from 2020-02-05 13-04-42.png

First part of that method.
In this method, Odoo takes all the allocations that have nextcall(is a date) set as False or nextcall is less than today along with many other conditions.

When we create a new allocation, nextcall will be False. and odoo will reset nextcall based on the interval(Day/Week/Month) 

So in your case,

You created allocation on 14th Jan, if you created the allocation before 18:00:59, Your allocations nextcall will be on 14th Feb. else Your nextcall will be 15th Feb. 

 You can use 'Run manually' button to run this action manually when ever you wish.

Avatar
Abbandona
Autore Risposta migliore

hi

thx for the answer, i verified the scheduled actions in developper mode. I think this scheduled action is correctly configured :

Model : Time Off Allocation

Scheduler User  : OdooBot

Execute Every :  1 Days

Active : Yes

Next Execution Date : 04/02/2020 18:00:59

Number of calls : -1

Priority :  5

My problem is : if you configured a monthly allocation time off (1 day/month) :

when this allocation is added to the employee? At the first day of the month or at the created date of the automatic allocation (the 14st day off the month in my example)?

Avatar
Abbandona

Answer updated. Please check

Autore

Thx for the anwser and the explanations. Everything is alright, my allocation will be added at 14st day of the month (creation date).

Post correlati Risposte Visualizzazioni Attività
2
ago 25
31643
1
gen 24
2221
1
ott 18
8713
0
feb 24
1243
1
nov 19
3830