Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
11893 Zobrazení

Hello,

How i can exclude weekend from number of days in Leave Requests. ex: start day (from_dt) = 12/04/2013 end day (to_dt) = 15/04/2013 it should be display 2 days in Number of Days not 4 days

plz help

Avatar
Zrušit
Nejlepší odpověď

Try the this method of python,, Isoweekday() is a method of the DateTime class that tells the day of the given date. It returns an integer that corresponds to a particular day.

Avatar
Zrušit
Nejlepší odpověď

It seems like since 2013 and Odoo v6 -  this problems still wasn't fixed?

Avatar
Zrušit
Nejlepší odpověď

You need to modify this method '_get_number_of_days', defined in hr.holidays object by using some datetime attributes that will exclude weekend from number of days.

Thanks, Priyesh Solanki

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 17
4849
0
bře 15
3630
3
říj 22
5223
0
kvě 18
4020
1
bře 15
4307