Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
11884 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 17
4838
0
thg 3 15
3624
3
thg 10 22
5215
0
thg 5 18
4014
1
thg 3 15
4300