2025-07-29 05:25:05 +00:00
|
|
|
from odoo import models, fields
|
|
|
|
|
|
|
|
class SchoolCourseStudent(models.Model):
|
|
|
|
_name = 'school.course.student'
|
|
|
|
_description = 'Enrolled Student'
|
2025-08-04 07:27:45 +00:00
|
|
|
|
|
|
|
application_id = fields.Many2one('school.application', string="Student", required=True)
|
2025-07-29 05:25:05 +00:00
|
|
|
course_id = fields.Many2one('school.course', string='Course', ondelete='cascade')
|
|
|
|
student_id = fields.Many2one('res.partner', string='Student')
|
2025-08-04 07:27:45 +00:00
|
|
|
student_name = fields.Char(related='application_id.name', string="Student Name", store=True)
|