تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
10172 أدوات العرض

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)?

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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)?

الصورة الرمزية
إهمال

Answer updated. Please check

الكاتب

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
31609
1
يناير 24
2188
1
أكتوبر 18
8666
0
فبراير 24
1234
1
نوفمبر 19
3814