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

Hello,

I am starting to use the OCA modules, in particular web_timeline, project_timeline, and project_recalculate, this is a great piece of work, so Muchas Gracias!

I want to provide a system for time planning, not so much for time tracking or attendance enforcement. I have installed hr_timesheet and project_recalculate

Trying it out, it does reassign the tasks, according to their estimated_days, but I observe the following:

- there is no resource levelling, that is a person might be allocated 200% on 2 full tasks in the same day

- it does not take the leaves into account, that is if a person has planned a vacation, it does not seem to take it.

Which leads me to some more fundamental questions:

- I have difficulty manipulating the working calendars. Do I have per force to install the mrp module in order to do that? Also I could not see where an employee could check its future work availability, net of company closure days, leaves, normal weekly time table. I would have preferred not to install the "Contract" module as at the moment contracts are not handled inside Odoo.

- I could not see where in the project it is possible to declare a project calendar

Overall I have the impression I'm not far from goal, but will appreciate the comments of the community. Thanks a lot to all,

Hubert

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

Hello, finally I got a piece of the solution. In my environment, in order to take into account the employee leaves, it is sufficient to overload a function in the project_recalculate/Models/resource_calendar.py

It would be great to have comments on this solution as I am still new to Odoo.

Thanks a lot, hj

def get_leave_intervals(self, resource_id=None,
start_datetime=None, end_datetime=None):
leaves1=super(ResourceCalendar, self).get_leave_intervals(resource_id=resource_id,
start_datetime=start_datetime,
end_datetime=end_datetime)
# hj take employee leaves into account
res_leave_ids=self.env['resource.calendar.leaves'].search([('resource_id', '=', resource_id)])
for leave in res_leave_ids:
date_from=fields.Datetime.from_string(leave.date_from)
date_to= fields.Datetime.from_string(leave.date_to)
leaves1.append((date_from, date_to))
return leaves1 


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 16
75
2
يوليو 25
4790
2
ديسمبر 24
7895
2
نوفمبر 24
28698
2
مايو 24
7596