17 lines
655 B
Python
17 lines
655 B
Python
|
from odoo import models, fields, api
|
||
|
from odoo.exceptions import ValidationError
|
||
|
|
||
|
class EnrollmentSubject(models.Model):
|
||
|
_name = 'school.enrollment.subject'
|
||
|
_description = 'Subject Line'
|
||
|
|
||
|
enrollment_id = fields.Many2one('school.enrollment', string="Enrollment")
|
||
|
subject_id = fields.Many2one('school.subject', string="Subject Name", required=True)
|
||
|
subject_name = fields.Char(string="Subject Name")
|
||
|
class_name = fields.Char(string="Class")
|
||
|
academic_year = fields.Char(string="Academic Year")
|
||
|
status = fields.Selection([
|
||
|
('active', 'Active'),
|
||
|
('inactive', 'Inactive')
|
||
|
], string="Status", default="active")
|