[FIX] hr: activity type configuration on hr plans
- Employees > Configuration > Planning Types and ensure the activity
type "To Do" is set to scheduled date several days after previous
activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
type "To Do";
- Click launch plan.
Before this commit, the activity type configuration is ignored and all
activities are due tomorrow.
Now, the activities are due taking into account the activity type
configuration.
opw-2255586
closes odoo/odoo#51423
X-original-commit: c159479d7f714f2ec871cc4b965de3f961160789
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
@@ -24,12 +24,13 @@ class HrPlanWizard(models.TransientModel):
|
||||
responsible = activity_type.get_responsible_id(self.employee_id)
|
||||
|
||||
if self.env['hr.employee'].with_user(responsible).check_access_rights('read', raise_exception=False):
|
||||
self.employee_id.activity_schedule(
|
||||
activity = self.employee_id.activity_schedule(
|
||||
activity_type_id=activity_type.activity_type_id.id,
|
||||
summary=activity_type.summary,
|
||||
note=activity_type.note,
|
||||
user_id=responsible.id
|
||||
)
|
||||
activity._onchange_activity_type_id()
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
|
||||
Reference in New Issue
Block a user