Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1491 Переглядів

i create a "Casual Leave" time off type form UI in odoo. and create a Accrual Plans " casual leave accrual" from UI that add 1 leave every month. i set the date 01/01/2023 to 24/08/2023. but i am getting "6.97" leaves.


why i am getting like this ? i mean in point value

Аватар
Відмінити
Автор Найкраща відповідь

i find the solution after very hard work. and it's simple..

i just change the start date = 30/12/2022 and End date = 31/12/2023 like this 

Current date is 25/08/2023 and i get 8 days. Woww..

Аватар
Відмінити
Найкраща відповідь

Hi,

The reason you're seeing 6.97 instead of a full number is because Odoo calculates accruals pro-rata based on days. Since your accrual is set from 01/01/2023 to 24/08/2023, it counts full months + a partial month (August), resulting in a decimal.

In your case:

  • 7 full months = 7.00
  • But since it ends on 24th August, Odoo prorates August (not the full month), which brings it to 6.97.

To avoid decimals, you can either:

  • Set the end date to the end of the month, or
  • Round values in reports/UI as needed.

Hope that clears it up!

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
серп. 23
1874
3
трав. 25
1982
0
лист. 23
2903
1
січ. 23
2314
0
серп. 23
2296