From b97f2d43093dde949ac54a948f86e3b9aa2088c2 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Thu, 28 Sep 2023 10:19:37 +0200 Subject: [PATCH] [IMP] hr_course: Allow to add activities --- hr_course/models/hr_course.py | 2 +- hr_course/models/hr_course_schedule.py | 2 +- hr_course/views/hr_course_schedule_views.xml | 7 ++----- hr_course/views/hr_course_views.xml | 5 +++++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hr_course/models/hr_course.py b/hr_course/models/hr_course.py index 8e0abb3acbd..94d7b99e267 100644 --- a/hr_course/models/hr_course.py +++ b/hr_course/models/hr_course.py @@ -8,7 +8,7 @@ class HrCourse(models.Model): _name = "hr.course" _description = "Course" - _inherit = "mail.thread" + _inherit = ["mail.thread", "mail.activity.mixin"] name = fields.Char(string="Name", required=True, tracking=True) category_id = fields.Many2one( diff --git a/hr_course/models/hr_course_schedule.py b/hr_course/models/hr_course_schedule.py index d09cf363e81..efcd5fee746 100644 --- a/hr_course/models/hr_course_schedule.py +++ b/hr_course/models/hr_course_schedule.py @@ -12,7 +12,7 @@ class HrCourseSchedule(models.Model): _name = "hr.course.schedule" _description = "Course Schedule" - _inherit = "mail.thread" + _inherit = ["mail.thread", "mail.activity.mixin"] name = fields.Char(string="Name", required=True, tracking=True) course_id = fields.Many2one("hr.course", string="Course", required=True) diff --git a/hr_course/views/hr_course_schedule_views.xml b/hr_course/views/hr_course_schedule_views.xml index c1105d1b854..bf8ab4ee536 100644 --- a/hr_course/views/hr_course_schedule_views.xml +++ b/hr_course/views/hr_course_schedule_views.xml @@ -140,11 +140,8 @@
- + +
diff --git a/hr_course/views/hr_course_views.xml b/hr_course/views/hr_course_views.xml index 507f638ff33..e93b86afaa9 100644 --- a/hr_course/views/hr_course_views.xml +++ b/hr_course/views/hr_course_views.xml @@ -55,6 +55,11 @@ +
+ + + +