Skip to content

Commit

Permalink
Merge branch '17.0-mig-hr_course' of github.com:DorianMAG/hr into 17.…
Browse files Browse the repository at this point in the history
…0-mig_supersedes-hr_course
  • Loading branch information
DorianMAG committed Jun 19, 2024
2 parents f6afb5b + 6b9c9b1 commit a55882e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 2 additions & 9 deletions hr_course/models/hr_course_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
11 changes: 9 additions & 2 deletions hr_course/views/hr_course_schedule_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@
string="Attendees"
invisible="state not in ['draft', 'waiting_attendees','cancelled']"
>
<field name="attendant_ids" />
<field
name="attendant_ids"
readonly="state not in ['waiting_attendees']"
/>
</page>
<page
string="Course Results"
Expand All @@ -127,7 +130,11 @@
groups="hr.group_hr_manager"
/>
</div>
<field name="course_attendee_ids" widget="one2many_list" />
<field
name="course_attendee_ids"
widget="one2many_list"
invisible="state not in ['in_validation']"
/>
</page>
<page
name="note"
Expand Down

0 comments on commit a55882e

Please sign in to comment.