From 6b9c9b1ed5e798956e3338c1f422b4327a84b251 Mon Sep 17 00:00:00 2001 From: DoDo Date: Wed, 19 Jun 2024 10:27:37 +0200 Subject: [PATCH] [FIX]readonly hr_course_schedule: attendant_ids, course_attendee_ids --- hr_course/models/hr_course_schedule.py | 11 ++--------- hr_course/views/hr_course_schedule_views.xml | 11 +++++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hr_course/models/hr_course_schedule.py b/hr_course/models/hr_course_schedule.py index 74658e77ae1..bfa8bb35c7a 100644 --- a/hr_course/models/hr_course_schedule.py +++ b/hr_course/models/hr_course_schedule.py @@ -49,16 +49,9 @@ class HrCourseSchedule(models.Model): instructor_ids = fields.Many2many("res.partner", string="Instructor") place = fields.Char() - attendant_ids = fields.Many2many( - "hr.employee", - readonly=True, - states={"waiting_attendees": [("readonly", False)]}, - ) + attendant_ids = fields.Many2many("hr.employee") course_attendee_ids = fields.One2many( - "hr.course.attendee", - inverse_name="course_schedule_id", - readonly=True, - states={"in_validation": [("readonly", False)]}, + "hr.course.attendee", inverse_name="course_schedule_id" ) note = fields.Text() diff --git a/hr_course/views/hr_course_schedule_views.xml b/hr_course/views/hr_course_schedule_views.xml index 681403e196d..9c3378f3a14 100644 --- a/hr_course/views/hr_course_schedule_views.xml +++ b/hr_course/views/hr_course_schedule_views.xml @@ -111,7 +111,10 @@ string="Attendees" invisible="state not in ['draft', 'waiting_attendees','cancelled']" > - + - +