Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
11899 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 17
4856
0
März 15
3647
3
Okt. 22
5240
0
Mai 18
4042
1
März 15
4313