odoo_18_Education_management/models/enrollment_subject.py

17 lines
655 B
Python
Raw Normal View History

2025-07-29 05:25:05 +00:00
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")