63 lines
2.1 KiB
Python
63 lines
2.1 KiB
Python
|
from odoo import models, fields
|
||
|
|
||
|
class SchoolNotice(models.Model):
|
||
|
_name = 'school.notice.board'
|
||
|
_description = 'School Notice Board'
|
||
|
|
||
|
title = fields.Char("Title", required=True)
|
||
|
start_date = fields.Date("Start Date", required=True)
|
||
|
end_date = fields.Date("End Date")
|
||
|
description = fields.Text("Description")
|
||
|
school_id = fields.Many2one('res.company', string="School", default=lambda self: self.env.company)
|
||
|
visible_to = fields.Selection([
|
||
|
('all', 'All'),
|
||
|
('students', 'Students'),
|
||
|
('teachers', 'Teachers')
|
||
|
], string="Visible To", default='all', required=True)
|
||
|
|
||
|
class SchoolReportDummy(models.Model):
|
||
|
_name = 'school.reporting.dummy'
|
||
|
_description = 'Reporting Dummy'
|
||
|
|
||
|
name = fields.Char("Report Name")
|
||
|
date_generated = fields.Date("Generated On", default=fields.Date.today)
|
||
|
|
||
|
|
||
|
|
||
|
class SchoolFeesReport(models.Model):
|
||
|
_name = 'school.fees.report'
|
||
|
_description = 'Fees Report'
|
||
|
|
||
|
name = fields.Char("Report Name")
|
||
|
amount = fields.Float("Amount")
|
||
|
|
||
|
class SchoolTranscriptReport(models.Model):
|
||
|
_name = 'school.transcript.report'
|
||
|
_description = 'Transcript Report'
|
||
|
|
||
|
student_id = fields.Many2one('school.application', string="Student", ondelete='set null')
|
||
|
grade = fields.Char("Grade")
|
||
|
|
||
|
class SchoolScholarshipReport(models.Model):
|
||
|
_name = 'school.scholarship.report'
|
||
|
_description = 'Scholarship Report'
|
||
|
|
||
|
student_id = fields.Many2one('school.application', string="Student", ondelete='set null')
|
||
|
scholarship_name = fields.Char("Scholarship Name")
|
||
|
awarded_amount = fields.Float("Awarded Amount")
|
||
|
|
||
|
class SchoolReportCard(models.Model):
|
||
|
_name = 'school.report.card'
|
||
|
_description = 'Report Card'
|
||
|
|
||
|
student_id = fields.Many2one('school.application', string="Student", ondelete='set null')
|
||
|
subject_id = fields.Many2one('school.subject', string="Subject Name", required=True)
|
||
|
score = fields.Float("Score")
|
||
|
|
||
|
class SchoolConfigSettings(models.Model):
|
||
|
_name = 'school.config.settings'
|
||
|
_description = 'School Configuration Settings'
|
||
|
|
||
|
key = fields.Char("Setting Key", required=True)
|
||
|
value = fields.Char("Setting Value")
|