update school management
This commit is contained in:
parent
fd6e55ccbb
commit
d672e9c566
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
'name': 'School_Management',
|
'name': 'School_Management',
|
||||||
'version': '1.0',
|
'version': '1.0',
|
||||||
'depends': ['base', 'web', 'mail','product'],
|
'depends': ['base', 'web', 'mail','product','hr'],
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
'data': [
|
'data': [
|
||||||
'security/security.xml',
|
'security/security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
'report/school_id_card_report.xml',
|
||||||
'views/schedule.xml',
|
'views/schedule.xml',
|
||||||
'views/class.xml',
|
'views/class.xml',
|
||||||
'views/subject.xml',
|
'views/subject.xml',
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
'views/school_student_views.xml',
|
'views/school_student_views.xml',
|
||||||
'views/fee_structure_views.xml',
|
'views/fee_structure_views.xml',
|
||||||
'views/fee_element_views.xml',
|
'views/fee_element_views.xml',
|
||||||
'views/menu.xml',
|
'views/menu.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': True,
|
'application': True,
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,7 +1,6 @@
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
import re
|
import re
|
||||||
from odoo.exceptions import UserError
|
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
class SchoolApplication(models.Model):
|
class SchoolApplication(models.Model):
|
||||||
|
@ -11,56 +10,54 @@ class SchoolApplication(models.Model):
|
||||||
_rec_name = 'name'
|
_rec_name = 'name'
|
||||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||||
|
|
||||||
name = fields.Char(string="Student Name", required=True,)
|
# Link to res.partner
|
||||||
email = fields.Char(string="Email", )
|
partner_id = fields.Many2one('res.partner', string="Student Contact", ondelete="cascade")
|
||||||
phone_no = fields.Char(string="Phone Number")
|
|
||||||
image = fields.Binary("Profile Photo", store=True)
|
# Basic Info
|
||||||
|
name = fields.Char(string="Student Name", required=True)
|
||||||
|
roll_no = fields.Char(string="Roll Number", readonly=False)
|
||||||
|
email = fields.Char(string="Email")
|
||||||
|
phone_no = fields.Char(string="Phone Number")
|
||||||
|
image = fields.Binary("Profile Photo", store=True)
|
||||||
address = fields.Text(string="Address")
|
address = fields.Text(string="Address")
|
||||||
|
|
||||||
|
# Class and Academic Info
|
||||||
class_name = fields.Selection([
|
class_name = fields.Selection([
|
||||||
('1', 'Class 1'),
|
('1', 'Class 1'), ('2', 'Class 2'), ('3', 'Class 3'),
|
||||||
('2', 'Class 2'),
|
('4', 'Class 4'), ('5', 'Class 5'), ('6', 'Class 6'),
|
||||||
('3', 'Class 3'),
|
('7', 'Class 7'), ('8', 'Class 8'), ('9', 'Class 9'),
|
||||||
('4', 'Class 4'),
|
('10', 'Class 10'), ('11', 'Class 11'), ('12', 'Class 12'),
|
||||||
('5', 'Class 5'),
|
|
||||||
('6', 'Class 6'),
|
|
||||||
('7', 'Class 7'),
|
|
||||||
('8', 'Class 8'),
|
|
||||||
('9', 'Class 9'),
|
|
||||||
('10', 'Class 10'),
|
|
||||||
('11', 'Class 11'),
|
|
||||||
('12', 'Class 12'),
|
|
||||||
], string="Class", required=True)
|
], string="Class", required=True)
|
||||||
|
|
||||||
academic_year = fields.Char(string="Academic Year")
|
academic_year = fields.Char(string="Academic Year")
|
||||||
gender = fields.Selection([
|
gender = fields.Selection([
|
||||||
('male', 'Male'),
|
('male', 'Male'), ('female', 'Female'), ('other', 'Other')
|
||||||
('female', 'Female'),
|
|
||||||
('other', 'Other')
|
|
||||||
], string="Gender")
|
], string="Gender")
|
||||||
|
|
||||||
date_of_birth = fields.Date(string="Date of Birth")
|
date_of_birth = fields.Date(string="Date of Birth")
|
||||||
parent_email = fields.Char(string="Parent Email")
|
parent_email = fields.Char(string="Parent Email")
|
||||||
|
|
||||||
blood_group = fields.Selection([
|
blood_group = fields.Selection([
|
||||||
('a+', 'A+'), ('a-', 'A-'),
|
('a+', 'A+'), ('a-', 'A-'), ('b+', 'B+'), ('b-', 'B-'),
|
||||||
('b+', 'B+'), ('b-', 'B-'),
|
('ab+', 'AB+'), ('ab-', 'AB-'), ('o+', 'O+'), ('o-', 'O-')
|
||||||
('ab+', 'AB+'), ('ab-', 'AB-'),
|
|
||||||
('o+', 'O+'), ('o-', 'O-')
|
|
||||||
], string="Blood Group")
|
], string="Blood Group")
|
||||||
|
|
||||||
school_name = fields.Char(string="Previous School")
|
school_name = fields.Char(string="Previous School")
|
||||||
has_disability = fields.Boolean(string="Any Disability")
|
has_disability = fields.Boolean(string="Any Disability")
|
||||||
is_ex_service_child = fields.Boolean(string="Ex-Service Man's Child")
|
is_ex_service_child = fields.Boolean(string="Ex-Service Man's Child")
|
||||||
|
|
||||||
caste = fields.Selection([
|
caste = fields.Selection([
|
||||||
('general', 'General'),
|
('general', 'General'), ('OBC', 'OBC'), ('SC', 'SC'),
|
||||||
('OBC', 'OBC'),
|
('ST', 'ST'), ('other', 'Other')
|
||||||
('SC', 'SC'),
|
|
||||||
('ST', 'ST'),
|
|
||||||
('other','Other')
|
|
||||||
], string="Caste")
|
], string="Caste")
|
||||||
|
|
||||||
status = fields.Selection([
|
status = fields.Selection([
|
||||||
('pending', 'Pending'),
|
('pending', 'Pending'),
|
||||||
('approved', 'Approved'),
|
('approved', 'Approved'),
|
||||||
('rejected', 'Rejected')
|
('rejected', 'Rejected')
|
||||||
], default='pending')
|
], default='pending')
|
||||||
|
|
||||||
|
# Parent Info
|
||||||
father_name = fields.Char(string="Father's Name")
|
father_name = fields.Char(string="Father's Name")
|
||||||
father_phone = fields.Char(string="Father's Phone")
|
father_phone = fields.Char(string="Father's Phone")
|
||||||
mother_name = fields.Char(string="Mother's Name")
|
mother_name = fields.Char(string="Mother's Name")
|
||||||
|
@ -80,14 +77,21 @@ class SchoolApplication(models.Model):
|
||||||
|
|
||||||
aadhaar_card = fields.Binary(string="Aadhaar Card")
|
aadhaar_card = fields.Binary(string="Aadhaar Card")
|
||||||
aadhaar_card_filename = fields.Char(string="Filename")
|
aadhaar_card_filename = fields.Char(string="Filename")
|
||||||
|
|
||||||
|
@api.onchange('roll_no')
|
||||||
|
def _onchange_roll_no(self):
|
||||||
|
"""Auto-generate roll number only when it's empty and user clicks the field."""
|
||||||
|
if not self.roll_no:
|
||||||
|
self.roll_no = self.env['ir.sequence'].next_by_code('school.application')
|
||||||
|
|
||||||
|
# Constraint on phone number
|
||||||
@api.constrains('phone_no')
|
@api.constrains('phone_no')
|
||||||
def _check_phone_no(self):
|
def _check_phone_no(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
if not re.fullmatch(r'\d{10}', record.phone_no or ''):
|
if record.phone_no and not re.fullmatch(r'\d{10}', record.phone_no):
|
||||||
raise ValidationError("Phone number must contain exactly 10 digits.")
|
raise ValidationError("Phone number must contain exactly 10 digits.")
|
||||||
|
|
||||||
|
# Show ID card action
|
||||||
def action_show_id_card(self):
|
def action_show_id_card(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
return {
|
return {
|
||||||
|
@ -97,22 +101,20 @@ class SchoolApplication(models.Model):
|
||||||
'res_model': 'school.application',
|
'res_model': 'school.application',
|
||||||
'res_id': self.id,
|
'res_id': self.id,
|
||||||
'view_id': self.env.ref('school_management.view_school_id_card_form').id,
|
'view_id': self.env.ref('school_management.view_school_id_card_form').id,
|
||||||
'target': 'new', # or 'current' for full page
|
'target': 'new',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Optional: Sync partner details with application
|
||||||
|
@api.onchange('partner_id')
|
||||||
|
def _onchange_partner_id(self):
|
||||||
|
if self.partner_id:
|
||||||
|
self.name = self.partner_id.name
|
||||||
|
self.email = self.partner_id.email
|
||||||
|
self.phone_no = self.partner_id.phone
|
||||||
|
self.image = self.partner_id.image_1920
|
||||||
|
self.address = self.partner_id.contact_address
|
||||||
|
|
||||||
@api.depends('application_id')
|
def print_id_card(self):
|
||||||
def _compute_student_id(self):
|
self.ensure_one()
|
||||||
for rec in self:
|
return self.env.ref('school_management.report_school_id_card').report_action(self)
|
||||||
rec.student_id = str(rec.application_id.id) if rec.application_id else ''
|
|
||||||
|
|
||||||
# def action_open_id_card_wizard(self):
|
|
||||||
# return {
|
|
||||||
# 'type': 'ir.actions.act_window',
|
|
||||||
# 'name': 'Generate ID Card',
|
|
||||||
# 'res_model': 'wizard.generate.id.card',
|
|
||||||
# 'view_mode': 'form',
|
|
||||||
# 'target': 'new',
|
|
||||||
# 'context': {'default_application_id': self.id},
|
|
||||||
# }
|
|
||||||
|
|
|
@ -1,58 +1,51 @@
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
|
||||||
|
|
||||||
|
|
||||||
class SchoolEnrollment(models.Model):
|
class SchoolEnrollment(models.Model):
|
||||||
_name = 'school.enrollment'
|
_name = 'school.enrollment'
|
||||||
_description = 'Enrollment'
|
_description = 'Enrollment'
|
||||||
|
|
||||||
|
|
||||||
application_id = fields.Many2one('school.application', string="Student", required=True)
|
# Relations
|
||||||
|
application_id = fields.Many2one('school.application', string="Application", required=True)
|
||||||
|
student_id = fields.Many2one('res.partner', string='Student', required=True)
|
||||||
school_id = fields.Many2one('res.company', string="School", default=lambda self: self.env.company)
|
school_id = fields.Many2one('res.company', string="School", default=lambda self: self.env.company)
|
||||||
student_id = fields.Char(string="Student ID", compute='_compute_student_id', store=True)
|
|
||||||
student_name = fields.Many2one('school.application', string="Student", ondelete='set null')
|
# Basic Info
|
||||||
image = fields.Binary("Profile Photo", store=True)
|
image = fields.Binary("Profile Photo", store=True)
|
||||||
class_name = fields.Selection([
|
class_name = fields.Selection([
|
||||||
('1', 'Class 1'),
|
('1', 'Class 1'), ('2', 'Class 2'), ('3', 'Class 3'),
|
||||||
('2', 'Class 2'),
|
('4', 'Class 4'), ('5', 'Class 5'), ('6', 'Class 6'),
|
||||||
('3', 'Class 3'),
|
('7', 'Class 7'), ('8', 'Class 8'), ('9', 'Class 9'),
|
||||||
('4', 'Class 4'),
|
('10', 'Class 10'), ('11', 'Class 11'), ('12', 'Class 12'),
|
||||||
('5', 'Class 5'),
|
|
||||||
('6', 'Class 6'),
|
|
||||||
('7', 'Class 7'),
|
|
||||||
('8', 'Class 8'),
|
|
||||||
('9', 'Class 9'),
|
|
||||||
('10', 'Class 10'),
|
|
||||||
('11', 'Class 11'),
|
|
||||||
('12', 'Class 12'),
|
|
||||||
], string="Class", required=True)
|
], string="Class", required=True)
|
||||||
|
|
||||||
course = fields.Char(string="Course")
|
course = fields.Char(string="Course")
|
||||||
session = fields.Char(string="Session")
|
session = fields.Char(string="Session")
|
||||||
academic_year = fields.Char(string="Academic Year")
|
academic_year = fields.Char(string="Academic Year")
|
||||||
|
enrollment_date = fields.Date(string="Enrollment Date")
|
||||||
|
|
||||||
|
# Fee Info
|
||||||
fees_structure = fields.Char(string="Fees Structure")
|
fees_structure = fields.Char(string="Fees Structure")
|
||||||
fees_status = fields.Selection([
|
fees_status = fields.Selection([
|
||||||
('paid', 'Paid'),
|
('paid', 'Paid'),
|
||||||
('partial', 'Partially Paid'),
|
('partial', 'Partially Paid'),
|
||||||
('unpaid', 'Unpaid')
|
('unpaid', 'Unpaid')
|
||||||
], string="Fees Status", default="unpaid")
|
], string="Fees Status", default="unpaid")
|
||||||
|
|
||||||
session_status = fields.Selection([
|
session_status = fields.Selection([
|
||||||
('active', 'Active'),
|
('active', 'Active'),
|
||||||
('completed', 'Completed'),
|
('completed', 'Completed'),
|
||||||
('drop', 'Dropped')
|
('drop', 'Dropped')
|
||||||
], string="Session Status", default="active")
|
], string="Session Status", default="active")
|
||||||
enrollment_date = fields.Date(string="Enrollment Date")
|
|
||||||
status = fields.Selection([
|
status = fields.Selection([
|
||||||
('draft', 'Draft'),
|
('draft', 'Draft'),
|
||||||
('confirmed', 'Confirmed'),
|
('confirmed', 'Confirmed'),
|
||||||
('cancelled', 'Cancelled')
|
('cancelled', 'Cancelled')
|
||||||
], string="Status", default='draft')
|
], string="Status", default='draft')
|
||||||
|
|
||||||
|
# Linked lines
|
||||||
subject_line_ids = fields.One2many('school.enrollment.subject', 'enrollment_id', string="Subjects")
|
subject_line_ids = fields.One2many('school.enrollment.subject', 'enrollment_id', string="Subjects")
|
||||||
fee_summary_line_ids = fields.One2many('school.enrollment.fee.summary', 'enrollment_id', string="Fee Summary")
|
fee_summary_line_ids = fields.One2many('school.enrollment.fee.summary', 'enrollment_id', string="Fee Summary")
|
||||||
course_id = fields.Many2one('school.course', string='Course', ondelete='cascade', required=True)
|
|
||||||
student_id = fields.Many2one('res.partner', string='Student', required=True)
|
|
||||||
|
|
||||||
@api.depends('application_id')
|
course_id = fields.Many2one('school.course', string='Course', ondelete='cascade', required=True)
|
||||||
def _compute_student_id(self):
|
|
||||||
for rec in self:
|
|
||||||
rec.student_id = str(rec.application_id.id) if rec.application_id else ''
|
|
||||||
|
|
|
@ -56,14 +56,4 @@ class SchoolClassSchedule(models.Model):
|
||||||
('ended', 'Ended')
|
('ended', 'Ended')
|
||||||
], string="Session Status")
|
], string="Session Status")
|
||||||
|
|
||||||
def action_send_message(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Send Message clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_log_note(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Log Note clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_schedule_activity(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Activity clicked for %s" % record.name)
|
|
|
@ -17,9 +17,4 @@ class SchoolCourse(models.Model):
|
||||||
attendance_ids = fields.One2many('school.course.attendance', 'course_id', string='Attendance')
|
attendance_ids = fields.One2many('school.course.attendance', 'course_id', string='Attendance')
|
||||||
enrolled_student_ids = fields.One2many('school.course.student', 'course_id', string='Enrolled Students')
|
enrolled_student_ids = fields.One2many('school.course.student', 'course_id', string='Enrolled Students')
|
||||||
attendance_ids = fields.One2many('school.course.attendance', 'course_id', string='Attendance')
|
attendance_ids = fields.One2many('school.course.attendance', 'course_id', string='Attendance')
|
||||||
schedule_line_ids = fields.One2many('school.course.schedule', 'course_id', string='Weekly Schedule')
|
|
||||||
assignment_ids = fields.One2many('school.course.assignment', 'course_id', string='Assignments')
|
assignment_ids = fields.One2many('school.course.assignment', 'course_id', string='Assignments')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,4 @@ class SchoolCourseAssignment(models.Model):
|
||||||
rec.assignment_count = 0
|
rec.assignment_count = 0
|
||||||
|
|
||||||
|
|
||||||
def action_send_message(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Send Message clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_log_note(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Log Note clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_schedule_activity(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Activity clicked for %s" % record.name)
|
|
|
@ -1,39 +1,6 @@
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
from odoo.exceptions import UserError
|
|
||||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
|
||||||
|
|
||||||
class SchoolCourseSchedule(models.Model):
|
class SchoolCourseSchedule(models.Model):
|
||||||
_name = 'school.course.schedule'
|
_inherit = 'hr.leave' # not 'school.course.schedule'
|
||||||
_description = 'Weekly Schedule'
|
|
||||||
|
|
||||||
course_id = fields.Many2one('school.course', string='Course', ondelete='cascade')
|
|
||||||
schedule_time = fields.Char(string='Schedule Time')
|
|
||||||
day = fields.Selection([
|
|
||||||
('mon', 'Monday'),
|
|
||||||
('tue', 'Tuesday'),
|
|
||||||
('wed', 'Wednesday'),
|
|
||||||
('thu', 'Thursday'),
|
|
||||||
('fri', 'Friday'),
|
|
||||||
('sat', 'Saturday'),
|
|
||||||
('sun', 'Sunday'),
|
|
||||||
], string='Day')
|
|
||||||
location = fields.Char(string='Location')
|
|
||||||
period = fields.Char(string='Period')
|
|
||||||
status = fields.Selection([
|
|
||||||
('planned', 'Planned'),
|
|
||||||
('ongoing', 'Ongoing'),
|
|
||||||
('completed', 'Completed')
|
|
||||||
], string='Status', default='planned')
|
|
||||||
|
|
||||||
|
|
||||||
def action_send_message(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Send Message clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_log_note(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Log Note clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_schedule_activity(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Activity clicked for %s" % record.name)
|
|
|
@ -1,32 +1,25 @@
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.exceptions import UserError
|
|
||||||
|
|
||||||
class SchoolStudent(models.Model):
|
class SchoolStudent(models.Model):
|
||||||
_name = 'school.student'
|
_name = 'school.student'
|
||||||
_description = 'Student'
|
_description = 'Student'
|
||||||
|
|
||||||
application_id = fields.Many2one('school.application', string="Application", required=True)
|
application_id = fields.Many2one('school.application', string="Application", required=True)
|
||||||
|
|
||||||
# Use computed char field instead of invalid related field
|
|
||||||
student_id = fields.Char(string="Student ID", compute='_compute_student_id', store=True)
|
|
||||||
|
|
||||||
profile_photo = fields.Binary(related='application_id.image', string="Profile Photo", store=True)
|
student_id = fields.Char(string="Student ID", compute='_compute_student_id', store=True)
|
||||||
|
|
||||||
|
# Related fields (autofilled from application)
|
||||||
student_name = fields.Char(related='application_id.name', string="Student Name", store=True)
|
student_name = fields.Char(related='application_id.name', string="Student Name", store=True)
|
||||||
|
profile_photo = fields.Binary(related='application_id.image', string="Profile Photo", store=True)
|
||||||
|
phone_no = fields.Char(related='application_id.phone_no', string="Phone No", store=True)
|
||||||
|
roll_no = fields.Char(related='application_id.roll_no', string="Roll Number", store=True, readonly=True)
|
||||||
|
|
||||||
school_id = fields.Many2one('res.company', string="School", default=lambda self: self.env.company)
|
school_id = fields.Many2one('res.company', string="School", default=lambda self: self.env.company)
|
||||||
enrollment_date = fields.Date(string="Enrollment Date")
|
enrollment_date = fields.Date(string="Enrollment Date")
|
||||||
class_name = fields.Selection([
|
class_name = fields.Selection([
|
||||||
('1', 'Class 1'),
|
('1', 'Class 1'), ('2', 'Class 2'), ('3', 'Class 3'), ('4', 'Class 4'),
|
||||||
('2', 'Class 2'),
|
('5', 'Class 5'), ('6', 'Class 6'), ('7', 'Class 7'), ('8', 'Class 8'),
|
||||||
('3', 'Class 3'),
|
('9', 'Class 9'), ('10', 'Class 10'), ('11', 'Class 11'), ('12', 'Class 12'),
|
||||||
('4', 'Class 4'),
|
|
||||||
('5', 'Class 5'),
|
|
||||||
('6', 'Class 6'),
|
|
||||||
('7', 'Class 7'),
|
|
||||||
('8', 'Class 8'),
|
|
||||||
('9', 'Class 9'),
|
|
||||||
('10', 'Class 10'),
|
|
||||||
('11', 'Class 11'),
|
|
||||||
('12', 'Class 12'),
|
|
||||||
], string="Class", required=True)
|
], string="Class", required=True)
|
||||||
academic_year = fields.Char(string="Academic Year")
|
academic_year = fields.Char(string="Academic Year")
|
||||||
session_status = fields.Selection([
|
session_status = fields.Selection([
|
||||||
|
|
|
@ -45,38 +45,42 @@ class SchoolSubject(models.Model):
|
||||||
lesson_plan = fields.Text(string='Lesson Plan')
|
lesson_plan = fields.Text(string='Lesson Plan')
|
||||||
teacher = fields.Many2one('res.users', string='Teacher')
|
teacher = fields.Many2one('res.users', string='Teacher')
|
||||||
lesson_plan_line_ids = fields.One2many('school.subject.lesson', 'subject_id', string='Lesson Plans')
|
lesson_plan_line_ids = fields.One2many('school.subject.lesson', 'subject_id', string='Lesson Plans')
|
||||||
teacher_info_line_ids = fields.One2many('school.subject.teacher.info', 'subject_id', string="Teacher Info")
|
teacher_info_line_ids = fields.One2many('hr.employee', 'subject_id', string="Teacher Info")
|
||||||
|
|
||||||
@api.depends('class_name')
|
|
||||||
def _compute_subjects(self):
|
@api.model
|
||||||
subject_mapping = {
|
def get_subjects_by_class(self):
|
||||||
'Class 1': ['Math', 'English', 'Science', 'MIL'],
|
return {
|
||||||
'Class 2': ['Math', 'English', 'Science', 'Drawing', 'MIL'],
|
'Class 1': ['math', 'english', 'science', 'mil'],
|
||||||
'Class 3': ['Math', 'English', 'Science', 'Odia', 'Drawing', 'English Grammar'],
|
'Class 2': ['math', 'english', 'science', 'drawing', 'mil'],
|
||||||
'Class 4': ['Math', 'English', 'Science', 'Odia', 'Drawing', 'English Grammar'],
|
'Class 3': ['math', 'english', 'science', 'odia', 'drawing', 'english_grammar'],
|
||||||
'Class 5': ['Math', 'English', 'Science', 'Odia', 'History', 'Drawing', 'English Grammar'],
|
'Class 4': ['math', 'english', 'science', 'odia', 'drawing', 'english_grammar'],
|
||||||
'Class 6': ['Math', 'English', 'Science', 'Geography', 'MIL', 'English Grammar'],
|
'Class 5': ['math', 'english', 'science', 'odia', 'history', 'drawing', 'english_grammar'],
|
||||||
'Class 7': ['Math', 'English', 'Science', 'Political Science', 'MIL', 'English Grammar', 'History', 'Geography'],
|
'Class 6': ['math', 'english', 'science', 'geography', 'mil', 'english_grammar'],
|
||||||
'Class 8': ['Math', 'English', 'Science', 'Political Science', 'MIL', 'English Grammar', 'History', 'Geography'],
|
'Class 7': ['math', 'english', 'science', 'political_science', 'mil', 'english_grammar', 'history', 'geography'],
|
||||||
'Class 9': ['Math', 'English', 'Physical Science', 'Life Science', 'English Grammar', 'Economic Science', 'History', 'Geography'],
|
'Class 8': ['math', 'english', 'science', 'political_science', 'mil', 'english_grammar', 'history', 'geography'],
|
||||||
'Class 10': ['Math', 'English', 'Physical Science', 'Life Science', 'English Grammar', 'Economic Science', 'History', 'Geography'],
|
'Class 9': ['math', 'english', 'physical_science', 'life_science', 'english_grammar', 'economic_science', 'history', 'geography'],
|
||||||
'Class 11': ['Physics', 'Chemistry', 'Math', 'Biology', 'English', 'English Grammar', 'Computer Science', 'MIL', 'Economic Science'],
|
'Class 10': ['math', 'english', 'physical_science', 'life_science', 'english_grammar', 'economic_science', 'history', 'geography'],
|
||||||
'Class 12': ['Physics', 'Chemistry', 'Math', 'Biology', 'Computer Science', 'English Grammar', 'English', 'MIL', 'Economic Science'],
|
'Class 11': ['physics', 'chemistry', 'math', 'biology', 'english', 'english_grammar', 'computer_science', 'mil', 'economic_science'],
|
||||||
|
'Class 12': ['physics', 'chemistry', 'math', 'biology', 'computer_science', 'english_grammar', 'english', 'mil', 'economic_science'],
|
||||||
}
|
}
|
||||||
for rec in self:
|
|
||||||
rec.subject_list = ', '.join(subject_mapping.get(rec.class_name, []))
|
|
||||||
def action_generate_subjects(self):
|
def action_generate_subjects(self):
|
||||||
if not self.class_name:
|
if not self.class_name:
|
||||||
raise UserError("Please select a class name first.")
|
raise UserError("Please select a class name first.")
|
||||||
|
|
||||||
|
# Get existing subjects for this class
|
||||||
existing_subjects = self.search([
|
existing_subjects = self.search([
|
||||||
('class_name', '=', self.class_name)
|
('class_name', '=', self.class_name)
|
||||||
]).mapped('name')
|
]).mapped('name')
|
||||||
|
|
||||||
|
# Get list of subjects by key (not label)
|
||||||
subject_list = self.get_subjects_by_class().get(self.class_name, [])
|
subject_list = self.get_subjects_by_class().get(self.class_name, [])
|
||||||
|
|
||||||
|
# Filter out already existing ones
|
||||||
new_subjects = [sub for sub in subject_list if sub not in existing_subjects]
|
new_subjects = [sub for sub in subject_list if sub not in existing_subjects]
|
||||||
|
|
||||||
|
# Create new records
|
||||||
for subject in new_subjects:
|
for subject in new_subjects:
|
||||||
self.create({
|
self.create({
|
||||||
'class_name': self.class_name,
|
'class_name': self.class_name,
|
||||||
|
|
|
@ -25,14 +25,4 @@ class SchoolSubjectLesson(models.Model):
|
||||||
for record in self:
|
for record in self:
|
||||||
record.activity_count = len(record.subject_id.teacher_info_line_ids)
|
record.activity_count = len(record.subject_id.teacher_info_line_ids)
|
||||||
|
|
||||||
def action_send_message(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Send Message clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_log_note(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Log Note clicked for %s" % record.name)
|
|
||||||
|
|
||||||
def action_schedule_activity(self):
|
|
||||||
for record in self:
|
|
||||||
raise UserError("Activity clicked for %s" % record.name)
|
|
|
@ -1,34 +1,19 @@
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
class SchoolSubjectTeacherInfo(models.Model):
|
class HrEmployee(models.Model):
|
||||||
_name = 'school.subject.teacher.info'
|
_inherit = 'hr.employee'
|
||||||
_description = 'Subject Teacher Info'
|
|
||||||
|
|
||||||
subject_id = fields.Many2one('school.subject', string='Subject', required=True, ondelete='cascade')
|
subject_id = fields.Many2one('school.subject', string="Subject")
|
||||||
|
|
||||||
# Related fields to auto-fetch from related subject's teacher (res.users)
|
|
||||||
teacher_user_id = fields.Many2one(related='subject_id.teacher', string="Teacher User", store=True)
|
|
||||||
employee_name = fields.Char(string='Teacher Name', compute="_compute_teacher_fields", store=True)
|
|
||||||
phone = fields.Char(string='Phone', compute="_compute_teacher_fields", store=True)
|
|
||||||
email = fields.Char(string='Email', compute="_compute_teacher_fields", store=True)
|
|
||||||
profile_photo = fields.Binary(string="Profile Photo", compute="_compute_teacher_fields", store=True)
|
|
||||||
|
|
||||||
# Editable fields for extra info
|
|
||||||
activity = fields.Char(string='Activity')
|
activity = fields.Char(string='Activity')
|
||||||
|
department = fields.Many2one('hr.department', string="Department")
|
||||||
activity_deadline = fields.Date(string='New Activity Deadline')
|
activity_deadline = fields.Date(string='New Activity Deadline')
|
||||||
department = fields.Char(string='Department')
|
|
||||||
job_position = fields.Char(string='Job Position')
|
|
||||||
manager = fields.Char(string='Manager')
|
|
||||||
address = fields.Text(string="Address")
|
|
||||||
experience = fields.Integer(string="Experience (Years)")
|
experience = fields.Integer(string="Experience (Years)")
|
||||||
date_of_birth = fields.Date(string="Date of Birth")
|
extra_info = fields.Text(string="Extra Info")
|
||||||
join_date = fields.Date(string="Join Date")
|
manager = fields.Char(string="Manager")
|
||||||
|
job_position = fields.Char(string="Job Position")
|
||||||
|
employee_name = fields.Char(compute="_compute_employee_name", store=True)
|
||||||
|
|
||||||
@api.depends('subject_id.teacher')
|
@api.depends('name')
|
||||||
def _compute_teacher_fields(self):
|
def _compute_employee_name(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
user = rec.subject_id.teacher
|
rec.employee_name = rec.name
|
||||||
rec.employee_name = user.name if user else ''
|
|
||||||
rec.email = user.email if user else ''
|
|
||||||
rec.phone = user.phone if user else ''
|
|
||||||
rec.profile_photo = user.image_1920 if user else False
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="report_school_id_card" model="ir.actions.report">
|
||||||
|
<field name="name">ID Card</field>
|
||||||
|
<field name="model">school.application</field>
|
||||||
|
<field name="report_type">qweb-pdf</field>
|
||||||
|
<field name="report_name">school_management.report_school_id_card_document</field>
|
||||||
|
<field name="report_file">school_management.report_school_id_card_document</field>
|
||||||
|
<field name="print_report_name">"'ID Card - %s' % (object.name)"</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<template id="report_school_id_card_document">
|
||||||
|
<t t-call="web.basic_layout">
|
||||||
|
<t t-foreach="docs" t-as="doc">
|
||||||
|
<div class="page">
|
||||||
|
<div style="text-align:center; border:1px solid black; padding:20px; border-radius:10px; width:400px; margin:auto;">
|
||||||
|
<h2>Student ID Card</h2>
|
||||||
|
<img t-if="doc.image" t-att-src="'data:image/png;base64,%s' % doc.image.decode('utf-8')" width="100" height="100"/>
|
||||||
|
<p><strong>Name:</strong> <t t-esc="doc.name"/></p>
|
||||||
|
<p><strong>Roll No:</strong> <t t-esc="doc.roll_no"/></p>
|
||||||
|
<p><strong>Class:</strong> <t t-esc="doc.class_name"/></p>
|
||||||
|
<p><strong>Father's Name:</strong> <t t-esc="doc.father_name"/></p>
|
||||||
|
<p><strong>DOB:</strong> <t t-esc="doc.date_of_birth"/></p>
|
||||||
|
<p><strong>Blood Group:</strong> <t t-esc="doc.blood_group"/></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
|
@ -10,11 +10,8 @@ access_school_subject,School Subject,model_school_subject,,1,1,1,1
|
||||||
access_school_course,School Course,model_school_course,,1,1,1,1
|
access_school_course,School Course,model_school_course,,1,1,1,1
|
||||||
access_school_course_attendance,School Course Attendance,model_school_course_attendance,,1,1,1,1
|
access_school_course_attendance,School Course Attendance,model_school_course_attendance,,1,1,1,1
|
||||||
access_school_course_student,School Course Student,model_school_course_student,,1,1,1,1
|
access_school_course_student,School Course Student,model_school_course_student,,1,1,1,1
|
||||||
access_school_course_schedule,School Course Schedule,model_school_course_schedule,,1,1,1,1
|
|
||||||
access_school_course_assignment,School Course Assignment,model_school_course_assignment,,1,1,1,1
|
access_school_course_assignment,School Course Assignment,model_school_course_assignment,,1,1,1,1
|
||||||
access_school_subject_lesson,School Subject Lesson,model_school_subject_lesson,,1,1,1,1
|
access_school_subject_lesson,School Subject Lesson,model_school_subject_lesson,,1,1,1,1
|
||||||
access_school_subject_teacher_info,School Subject Teacher Info,model_school_subject_teacher_info,,1,1,1,1
|
|
||||||
access_school_subject_teacher_info_admin,Subject Teacher Info,model_school_subject_teacher_info,school_management.group_school_admin,1,1,1,1
|
|
||||||
access_teacher_attendance,Teacher Attendance,model_school_teacher_attendance,,1,1,1,1
|
access_teacher_attendance,Teacher Attendance,model_school_teacher_attendance,,1,1,1,1
|
||||||
access_school_notice_board,School Notice Board,model_school_notice_board,,1,1,1,1
|
access_school_notice_board,School Notice Board,model_school_notice_board,,1,1,1,1
|
||||||
access_school_reporting_dummy,School Reporting Dummy,model_school_reporting_dummy,,1,1,1,1
|
access_school_reporting_dummy,School Reporting Dummy,model_school_reporting_dummy,,1,1,1,1
|
||||||
|
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<!-- Tree View -->
|
<!-- list View -->
|
||||||
<record id="view_school_application_list" model="ir.ui.view">
|
<record id="view_school_application_list" model="ir.ui.view">
|
||||||
<field name="name">school.application.list</field>
|
<field name="name">school.application.list</field>
|
||||||
<field name="model">school.application</field>
|
<field name="model">school.application</field>
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
<list>
|
<list>
|
||||||
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image', 'size': [40, 40]}"/>
|
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image', 'size': [40, 40]}"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="partner_id"/>
|
||||||
<field name="email"/>
|
<field name="email"/>
|
||||||
<field name="phone_no"/>
|
<field name="phone_no"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
|
@ -28,18 +29,20 @@
|
||||||
<div class="oe_avatar">
|
<div class="oe_avatar">
|
||||||
<field name="image" widget="image" class="oe_avatar"/>
|
<field name="image" widget="image" class="oe_avatar"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
|
<field name="partner_id"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="roll_no" placeholder="Click here to generate roll no"/>
|
||||||
<field name="email"/>
|
<field name="email"/>
|
||||||
<field name="phone_no"/>
|
<field name="phone_no"/>
|
||||||
<field name="address"/>
|
<field name="address"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
<field name="gender"/>
|
<field name="gender"/>
|
||||||
<field name="date_of_birth"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
<field name="date_of_birth"/>
|
||||||
<field name="parent_email"/>
|
<field name="parent_email"/>
|
||||||
<field name="blood_group"/>
|
<field name="blood_group"/>
|
||||||
<field name="school_name"/>
|
<field name="school_name"/>
|
||||||
|
@ -53,47 +56,53 @@
|
||||||
string="Show ID Card"
|
string="Show ID Card"
|
||||||
type="object"
|
type="object"
|
||||||
class="btn-primary"/>
|
class="btn-primary"/>
|
||||||
|
<button name="print_id_card"
|
||||||
|
string="Download ID Card"
|
||||||
|
type="object"
|
||||||
|
class="btn-secondary"
|
||||||
|
icon="fa-download"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<notebook>
|
<notebook>
|
||||||
<!-- Parent Details Tab -->
|
<!-- Parent Details Tab -->
|
||||||
<page string="Parent Details">
|
<page string="Parent Details">
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="father_name"/>
|
<field name="father_name"/>
|
||||||
<field name="father_occupation"/>
|
<field name="father_occupation"/>
|
||||||
<field name="father_phone"/>
|
<field name="father_phone"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="mother_name"/>
|
<field name="mother_name"/>
|
||||||
<field name="mother_occupation"/>
|
<field name="mother_occupation"/>
|
||||||
<field name="mother_phone"/>
|
<field name="mother_phone"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
<!-- Admission Query Tab -->
|
<!-- Admission Query Tab -->
|
||||||
<page string="Admission Query">
|
<page string="Admission Query">
|
||||||
<group>
|
<group>
|
||||||
<field name="admission_query" placeholder="Write any special query here..."/>
|
<field name="admission_query" placeholder="Write any special query here..."/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
<!-- Documents Upload Tab -->
|
<!-- Documents Upload Tab -->
|
||||||
<page string="Documents">
|
<page string="Documents">
|
||||||
<group>
|
<group>
|
||||||
<field name="birth_certificate" filename="birth_certificate"/>
|
<field name="birth_certificate" filename="birth_certificate"/>
|
||||||
<field name="aadhaar_card" filename="aadhaar_card"/>
|
<field name="aadhaar_card" filename="aadhaar_card"/>
|
||||||
<field name="tc_certificate" filename="tc_certificate"/>
|
<field name="tc_certificate" filename="tc_certificate"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- ID Card View -->
|
||||||
<record id="view_school_id_card_form" model="ir.ui.view">
|
<record id="view_school_id_card_form" model="ir.ui.view">
|
||||||
<field name="name">school.application.id.card</field>
|
<field name="name">school.application.id.card</field>
|
||||||
<field name="model">school.application</field>
|
<field name="model">school.application</field>
|
||||||
|
@ -103,11 +112,12 @@
|
||||||
<div style="max-width: 300px; margin: auto; border: 2px solid #000; padding: 20px; text-align: center; border-radius: 10px;">
|
<div style="max-width: 300px; margin: auto; border: 2px solid #000; padding: 20px; text-align: center; border-radius: 10px;">
|
||||||
<div style="text-align: center; margin-bottom: 15px;">
|
<div style="text-align: center; margin-bottom: 15px;">
|
||||||
<field name="image" widget="image"
|
<field name="image" widget="image"
|
||||||
style="width: 70px; height: 70px; border-radius: 50%; object-fit: cover; display: inline-block;"/>
|
style="width: 50px; height: 50px; border-radius: 50%; object-fit: cover; display: inline-block;"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 20px;">
|
<div style="margin-left: 20px;">
|
||||||
<h2 style="margin-bottom: 10px;"><field name="name" readonly="1"/></h2>
|
<h2 style="margin-bottom: 8px;"><field name="name" readonly="1"/></h2>
|
||||||
<p><strong>School:</strong> <field name="school_name" readonly="1"/></p>
|
<p><strong>School:</strong> <field name="school_name" readonly="1"/></p>
|
||||||
|
<p><strong>Roll No:</strong> <field name="roll_no" readonly="1"/></p>
|
||||||
<p><strong>Academic Year:</strong> <field name="academic_year" readonly="1"/></p>
|
<p><strong>Academic Year:</strong> <field name="academic_year" readonly="1"/></p>
|
||||||
<p><strong>Blood Group:</strong> <field name="blood_group" readonly="1"/></p>
|
<p><strong>Blood Group:</strong> <field name="blood_group" readonly="1"/></p>
|
||||||
<p><strong>Father's Name:</strong> <field name="father_name" readonly="1"/></p>
|
<p><strong>Father's Name:</strong> <field name="father_name" readonly="1"/></p>
|
||||||
|
@ -127,6 +137,7 @@
|
||||||
<kanban class="o_kanban_small_column">
|
<kanban class="o_kanban_small_column">
|
||||||
<field name="image"/>
|
<field name="image"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="partner_id"/>
|
||||||
<field name="email"/>
|
<field name="email"/>
|
||||||
<field name="phone_no"/>
|
<field name="phone_no"/>
|
||||||
<field name="status"/>
|
<field name="status"/>
|
||||||
|
@ -134,10 +145,11 @@
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div class="d-flex align-items-start" style="gap: 20px;">
|
<div class="d-flex align-items-start" style="gap: 20px;">
|
||||||
<div>
|
<div>
|
||||||
<field name="image" widget="image" alt="Product" style="width: 60px; height: 60px; object-fit: cover;" options="{'img_class': 'w-100 object-fit-contain'}" invisible="not image"/>
|
<field name="image" widget="image" style="width: 60px; height: 60px; object-fit: cover;" options="{'img_class': 'w-100 object-fit-contain'}" invisible="not image"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_kanban_details">
|
<div class="o_kanban_details">
|
||||||
<strong><field name="name"/></strong><br/>
|
<strong><field name="name"/></strong><br/>
|
||||||
|
<i class="fa fa-user"/> <field name="partner_id"/><br/>
|
||||||
<i class="fa fa-envelope"/> <field name="email"/><br/>
|
<i class="fa fa-envelope"/> <field name="email"/><br/>
|
||||||
<i class="fa fa-phone"/> <field name="phone_no"/><br/>
|
<i class="fa fa-phone"/> <field name="phone_no"/><br/>
|
||||||
<field name="status"/>
|
<field name="status"/>
|
||||||
|
@ -149,7 +161,6 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Pivot View -->
|
<!-- Pivot View -->
|
||||||
<record id="view_school_application_pivot" model="ir.ui.view">
|
<record id="view_school_application_pivot" model="ir.ui.view">
|
||||||
<field name="name">school.application.pivot</field>
|
<field name="name">school.application.pivot</field>
|
||||||
|
|
|
@ -32,11 +32,6 @@
|
||||||
<field name="due_date"/>
|
<field name="due_date"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<div class="oe_button_box d-flex" name="custom_buttons" style="margin: 10px 0; gap: 10px;">
|
|
||||||
<button type="object" name="action_send_message" class="btn btn-primary" string="Send Message"/>
|
|
||||||
<button type="object" name="action_log_note" class="btn btn-secondary" string="Log Note"/>
|
|
||||||
<button type="object" name="action_schedule_activity" class="btn btn-info" string="Activity"/>
|
|
||||||
</div>
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<!-- Tree View -->
|
<!-- list View -->
|
||||||
<record id="view_school_class_list" model="ir.ui.view">
|
<record id="view_school_class_list" model="ir.ui.view">
|
||||||
<field name="name">school.class.list</field>
|
<field name="name">school.class.list</field>
|
||||||
<field name="model">school.class</field>
|
<field name="model">school.class</field>
|
||||||
|
|
|
@ -52,19 +52,6 @@
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
<!-- TAB 2: Weekly Schedule -->
|
|
||||||
<page string="Weekly Schedule">
|
|
||||||
<field name="schedule_line_ids">
|
|
||||||
<list editable="bottom">
|
|
||||||
<field name="schedule_time"/>
|
|
||||||
<field name="day"/>
|
|
||||||
<field name="location"/>
|
|
||||||
<field name="period"/>
|
|
||||||
<field name="status"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
|
|
||||||
<!-- TAB 3: Assignment -->
|
<!-- TAB 3: Assignment -->
|
||||||
<page string="Assignment">
|
<page string="Assignment">
|
||||||
<field name="assignment_ids">
|
<field name="assignment_ids">
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<!-- Tree (List) View -->
|
<!-- List View -->
|
||||||
<record id="view_school_enrollment_list" model="ir.ui.view">
|
<record id="view_school_enrollment_list" model="ir.ui.view">
|
||||||
<field name="name">school.enrollment.list</field>
|
<field name="name">school.enrollment.list</field>
|
||||||
<field name="model">school.enrollment</field>
|
<field name="model">school.enrollment</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list>
|
<list>
|
||||||
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image', 'size': [40, 40]}"/>
|
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image', 'size': [40, 40]}"/>
|
||||||
<field name="student_name"/>
|
<field name="student_id"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
<field name="fees_status"/>
|
<field name="fees_status"/>
|
||||||
<field name="session_status"/>
|
<field name="session_status"/>
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Form View -->
|
<!-- Form View -->
|
||||||
<record id="view_school_enrollment_form" model="ir.ui.view">
|
<record id="view_school_enrollment_form" model="ir.ui.view">
|
||||||
<field name="name">school.enrollment.form</field>
|
<field name="name">school.enrollment.form</field>
|
||||||
|
@ -24,16 +23,16 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Enrollment Form">
|
<form string="Enrollment Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<div class="oe_avatar" style="margin-bottom: 15px;">
|
<div class="oe_avatar" style="margin-bottom: 15px;">
|
||||||
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image'}"/>
|
<field name="image" widget="image" class="oe_avatar" options="{'preview_image': 'image'}"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Main Two-Column Group -->
|
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="student_name"/>
|
<field name="application_id"/>
|
||||||
|
<field name="student_id"/>
|
||||||
<field name="school_id"/>
|
<field name="school_id"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
<field name="course"/>
|
<field name="course"/>
|
||||||
|
@ -47,66 +46,57 @@
|
||||||
<field name="enrollment_date"/>
|
<field name="enrollment_date"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
|
||||||
<!-- Subject Tab -->
|
|
||||||
<page string="Subjects">
|
|
||||||
<field name="subject_line_ids">
|
|
||||||
<list editable="bottom">
|
|
||||||
<field name="subject_name"/>
|
|
||||||
<field name="class_name"/>
|
|
||||||
<field name="academic_year"/>
|
|
||||||
<field name="status"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
|
|
||||||
<!-- Fee Summary Tab -->
|
<notebook>
|
||||||
<page string="Fee Summary">
|
<!-- Subject Tab -->
|
||||||
<field name="fee_summary_line_ids">
|
<page string="Subjects">
|
||||||
<list editable="bottom">
|
<field name="subject_line_ids">
|
||||||
<field name="total_fees"/>
|
<list editable="bottom">
|
||||||
<field name="paid_fees"/>
|
<field name="subject_name"/>
|
||||||
<field name="fee_slip_amount"/>
|
<field name="class_name"/>
|
||||||
<field name="due_fees"/>
|
<field name="academic_year"/>
|
||||||
<field name="fee_element"/>
|
<field name="status"/>
|
||||||
<field name="frequency"/>
|
</list>
|
||||||
<field name="amount_paid"/>
|
</field>
|
||||||
</list>
|
</page>
|
||||||
</field>
|
|
||||||
</page>
|
<!-- Fee Summary Tab -->
|
||||||
</notebook>
|
<page string="Fee Summary">
|
||||||
</sheet>
|
<field name="fee_summary_line_ids">
|
||||||
|
<list editable="bottom">
|
||||||
|
<field name="total_fees"/>
|
||||||
|
<field name="paid_fees"/>
|
||||||
|
<field name="fee_slip_amount"/>
|
||||||
|
<field name="due_fees"/>
|
||||||
|
<field name="fee_element"/>
|
||||||
|
<field name="frequency"/>
|
||||||
|
<field name="amount_paid"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Kanban View -->
|
<!-- Kanban View -->
|
||||||
<record id="view_school_enrollment_kanban" model="ir.ui.view">
|
<record id="view_school_enrollment_kanban" model="ir.ui.view">
|
||||||
<field name="name">school.enrollment.kanban</field>
|
<field name="name">school.enrollment.kanban</field>
|
||||||
<field name="model">school.enrollment</field>
|
<field name="model">school.enrollment</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<kanban class="o_kanban_small_column">
|
<kanban class="o_kanban_small_column">
|
||||||
<!-- Declare fields used -->
|
<field name="student_id"/>
|
||||||
<field name="student_name"/>
|
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
<field name="course"/>
|
<field name="course"/>
|
||||||
<field name="fees_status"/>
|
<field name="fees_status"/>
|
||||||
<field name="session_status"/>
|
<field name="session_status"/>
|
||||||
<field name="enrollment_date"/>
|
<field name="enrollment_date"/>
|
||||||
|
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div class="oe_kanban_global_click o_kanban_record" style="padding: 8px;">
|
<div class="oe_kanban_global_click o_kanban_record" style="padding: 8px;">
|
||||||
<!-- Top: Student Name -->
|
<strong><field name="student_id"/></strong><br/>
|
||||||
<strong>
|
|
||||||
<field name="student_name"/>
|
|
||||||
</strong><br/>
|
|
||||||
|
|
||||||
<!-- Info Grid -->
|
|
||||||
<div style="margin-top: 8px;">
|
<div style="margin-top: 8px;">
|
||||||
<!-- <div><strong>Class:</strong> <field name="class_name"/></div> -->
|
|
||||||
<div><strong>Course:</strong> <field name="course"/></div>
|
<div><strong>Course:</strong> <field name="course"/></div>
|
||||||
<div><strong>Fees:</strong> <field name="fees_status"/></div>
|
<div><strong>Fees:</strong> <field name="fees_status"/></div>
|
||||||
<div><strong>Session:</strong> <field name="session_status"/></div>
|
<div><strong>Session:</strong> <field name="session_status"/></div>
|
||||||
|
@ -119,6 +109,7 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Pivot View -->
|
||||||
<record id="view_school_enrollment_pivot" model="ir.ui.view">
|
<record id="view_school_enrollment_pivot" model="ir.ui.view">
|
||||||
<field name="name">school.enrollment.pivot</field>
|
<field name="name">school.enrollment.pivot</field>
|
||||||
<field name="model">school.enrollment</field>
|
<field name="model">school.enrollment</field>
|
||||||
|
@ -143,8 +134,7 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Action -->
|
||||||
<!-- Action Window -->
|
|
||||||
<record id="action_school_enrollment" model="ir.actions.act_window">
|
<record id="action_school_enrollment" model="ir.actions.act_window">
|
||||||
<field name="name">Enrollment</field>
|
<field name="name">Enrollment</field>
|
||||||
<field name="res_model">school.enrollment</field>
|
<field name="res_model">school.enrollment</field>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<menuitem id="menu_teacher_timeoff"
|
<menuitem id="menu_teacher_timeoff"
|
||||||
name="Time Off"
|
name="Time Off"
|
||||||
parent="menu_teachers_root"
|
parent="menu_teachers_root"
|
||||||
action="action_school_course_schedule"
|
action="action_course_schedule_hr_leave"
|
||||||
sequence="5"/>
|
sequence="5"/>
|
||||||
|
|
||||||
<!-- Notice Board Menu -->
|
<!-- Notice Board Menu -->
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- list View -->
|
<!-- List View -->
|
||||||
<record id="view_school_student_list" model="ir.ui.view">
|
<record id="view_school_student_list" model="ir.ui.view">
|
||||||
<field name="name">school.student.list</field>
|
<field name="name">school.student.list</field>
|
||||||
<field name="model">school.student</field>
|
<field name="model">school.student</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list>
|
<list>
|
||||||
<field name="student_name"/>
|
<field name="student_name"/>
|
||||||
|
<field name="roll_no"/>
|
||||||
|
<field name="phone_no"/>
|
||||||
<field name="school_id"/>
|
<field name="school_id"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
<field name="academic_year"/>
|
<field name="academic_year"/>
|
||||||
|
@ -33,7 +35,9 @@
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="student_name"/>
|
<field name="student_name" readonly="1"/>
|
||||||
|
<field name="roll_no"/>
|
||||||
|
<field name="phone_no" readonly="1"/>
|
||||||
<field name="application_id"/>
|
<field name="application_id"/>
|
||||||
<field name="school_id"/>
|
<field name="school_id"/>
|
||||||
<field name="class_name"/>
|
<field name="class_name"/>
|
||||||
|
@ -52,6 +56,7 @@
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Kanban View -->
|
<!-- Kanban View -->
|
||||||
<record id="view_school_student_kanban" model="ir.ui.view">
|
<record id="view_school_student_kanban" model="ir.ui.view">
|
||||||
<field name="name">school.student.kanban</field>
|
<field name="name">school.student.kanban</field>
|
||||||
|
@ -66,11 +71,14 @@
|
||||||
<div class="oe_kanban_global_click o_kanban_record">
|
<div class="oe_kanban_global_click o_kanban_record">
|
||||||
<div class="d-flex align-items-center" style="gap: 12px;">
|
<div class="d-flex align-items-center" style="gap: 12px;">
|
||||||
<div>
|
<div>
|
||||||
<field name="profile_photo" widget="image" style="width: 60px; height: 60px; object-fit: cover;" options="{'img_class': 'w-100'}" />
|
<field name="profile_photo" widget="image"
|
||||||
|
style="width: 60px; height: 60px; object-fit: cover;"
|
||||||
|
options="{'img_class': 'w-100'}" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong><field name="student_id"/></strong><br/>
|
<strong><field name="student_name"/></strong><br/>
|
||||||
<small>Class: <field name="class_name"/></small>
|
<small>Class: <field name="class_name"/></small><br/>
|
||||||
|
<small>Phone: <field name="phone_no"/></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,7 +98,7 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu: School Management > Students > All Students -->
|
<!-- Menu Items -->
|
||||||
<menuitem id="menu_school_student_root"
|
<menuitem id="menu_school_student_root"
|
||||||
name="Students"
|
name="Students"
|
||||||
parent="menu_school_root"
|
parent="menu_school_root"
|
||||||
|
@ -101,5 +109,4 @@
|
||||||
parent="menu_school_student_root"
|
parent="menu_school_student_root"
|
||||||
action="action_school_student"
|
action="action_school_student"
|
||||||
sequence="1" />
|
sequence="1" />
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
@ -1,77 +1,65 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- list View -->
|
<!-- Form View Inherited from hr.employee -->
|
||||||
<record id="view_school_subject_teacher_list" model="ir.ui.view">
|
<record id="view_school_subject_teacher_form" model="ir.ui.view">
|
||||||
<field name="name">school.subject.teacher.list</field>
|
<field name="name">school.subject.teacher.form</field>
|
||||||
<field name="model">school.subject.teacher.info</field>
|
<field name="model">hr.employee</field>
|
||||||
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list string="Subject Teacher Info">
|
<xpath expr="//field[@name='work_email']" position="after">
|
||||||
<field name="employee_name"/>
|
<field name="activity"/>
|
||||||
<field name="subject_id"/>
|
<field name="activity_deadline"/>
|
||||||
<field name="phone"/>
|
|
||||||
<field name="email"/>
|
</xpath>
|
||||||
<field name="date_of_birth"/>
|
|
||||||
<field name="join_date"/>
|
<xpath expr="//field[@name='department_id']" position="after">
|
||||||
<field name="experience"/>
|
<field name="experience"/>
|
||||||
</list>
|
<field name="extra_info"/>
|
||||||
|
<field name="manager"/>
|
||||||
|
<field name="job_position"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Form View -->
|
<!-- List View -->
|
||||||
<record id="view_school_subject_teacher_form" model="ir.ui.view">
|
<record id="view_school_subject_teacher_list" model="ir.ui.view">
|
||||||
<field name="name">school.subject.teacher.form</field>
|
<field name="name">school.subject.teacher.list</field>
|
||||||
<field name="model">school.subject.teacher.info</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Subject Teacher Info">
|
<list string="Subject Teacher List">
|
||||||
<sheet>
|
<field name="name"/>
|
||||||
<group>
|
<field name="job_title"/>
|
||||||
<group>
|
<field name="work_email"/>
|
||||||
<field name="profile_photo" widget="image" class="oe_avatar" options="{'preview_image': 'profile_photo'}"/>
|
<field name="mobile_phone"/>
|
||||||
<field name="employee_name"/>
|
<field name="experience"/>
|
||||||
<field name="subject_id"/>
|
</list>
|
||||||
<field name="phone"/>
|
|
||||||
<field name="email"/>
|
|
||||||
<field name="date_of_birth"/>
|
|
||||||
<field name="join_date"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="activity"/>
|
|
||||||
<field name="activity_deadline"/>
|
|
||||||
<field name="department"/>
|
|
||||||
<field name="job_position"/>
|
|
||||||
<field name="manager"/>
|
|
||||||
<field name="experience"/>
|
|
||||||
<field name="address"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Kanban View -->
|
<!-- Kanban View -->
|
||||||
<record id="view_school_subject_teacher_kanban" model="ir.ui.view">
|
<record id="view_school_subject_teacher_kanban" model="ir.ui.view">
|
||||||
<field name="name">school.subject.teacher.kanban</field>
|
<field name="name">school.subject.teacher.kanban</field>
|
||||||
<field name="model">school.subject.teacher.info</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<kanban class="o_kanban_example">
|
<kanban>
|
||||||
<field name="employee_name"/>
|
<field name="name"/>
|
||||||
<field name="profile_photo"/>
|
<field name="image_1920"/>
|
||||||
<field name="subject_id"/>
|
<field name="job_title"/>
|
||||||
<field name="email"/>
|
<field name="work_email"/>
|
||||||
<field name="phone"/>
|
<field name="mobile_phone"/>
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div class="d-flex align-items-center" style="gap: 20px;" >
|
<div class="o_kanban_record">
|
||||||
<div>
|
<div class="o_kanban_image">
|
||||||
<field name="profile_photo" widget="image" alt="Product" style="width: 60px; height: 60px; object-fit: cover;" options="{'img_class': 'w-100 object-fit-contain'}" invisible="not profile_photo"/>
|
<img t-att-src="kanban_image('hr.employee', 'image_1920', record.id.value)" class="img img-fluid rounded-circle" t-att-alt="record.name.value"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_kanban_details">
|
<div class="o_kanban_details">
|
||||||
<strong><field name="employee_name"/></strong><br/>
|
<strong><field name="name"/></strong><br/>
|
||||||
<small><field name="subject_id"/></small><br/>
|
<span t-if="record.job_title.raw_value"><br/>
|
||||||
<i class="fa fa-envelope"/> <field name="email"/><br/>
|
<field name="job_title"/></span><br/>
|
||||||
<i class="fa fa-phone"/> <field name="phone"/>
|
<i class="fa fa-envelope"/> <field name="work_email"/><br/>
|
||||||
|
<i class="fa fa-phone"/> <field name="mobile_phone"/><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
@ -80,41 +68,25 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!--Pivot View-->
|
|
||||||
<record id="view_school_subject_teacher_pivot" model="ir.ui.view">
|
|
||||||
<field name="name">school.subject.teacher.pivot</field>
|
|
||||||
<field name="model">school.subject.teacher.info</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<pivot string="Subject Teacher Stats" disable_linking="True">
|
|
||||||
<field name="subject_id" type="row"/>
|
|
||||||
<field name="department" type="row"/>
|
|
||||||
<field name="job_position" type="row"/>
|
|
||||||
<field name="experience" type="measure"/>
|
|
||||||
<!-- <field name="join_date" interval="month" type="column"/> -->
|
|
||||||
</pivot>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Search View -->
|
<!-- Search View -->
|
||||||
<record id="view_school_subject_teacher_search" model="ir.ui.view">
|
<record id="view_school_subject_teacher_search" model="ir.ui.view">
|
||||||
<field name="name">school.subject.teacher.search</field>
|
<field name="name">school.subject.teacher.search</field>
|
||||||
<field name="model">school.subject.teacher.info</field>
|
<field name="model">hr.employee</field>
|
||||||
|
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<xpath expr="//search" position="inside">
|
||||||
<field name="employee_name"/>
|
<field name="experience"/>
|
||||||
<field name="subject_id"/>
|
|
||||||
<field name="email"/>
|
</xpath>
|
||||||
<field name="department"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Action -->
|
<!-- Action -->
|
||||||
<record id="action_school_subject_teacher_info" model="ir.actions.act_window">
|
<record id="action_school_subject_teacher_info" model="ir.actions.act_window">
|
||||||
<field name="name">All Teachers</field>
|
<field name="name">Subject Teachers</field>
|
||||||
<field name="res_model">school.subject.teacher.info</field>
|
<field name="res_model">hr.employee</field>
|
||||||
<field name="view_mode">kanban,search,pivot,list,form</field>
|
<field name="view_mode">kanban,list,form,search</field>
|
||||||
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
<field name="binding_model_id" ref="model_school_subject"/>
|
<field name="binding_model_id" ref="model_school_subject"/>
|
||||||
<field name="binding_view_types">form</field>
|
<field name="binding_view_types">form</field>
|
||||||
<field name="code">
|
<field name="code">
|
||||||
action = env['school.subject'].create_subjects_for_class(record.class_name)
|
record.action_generate_subjects()
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- List View -->
|
<!-- List View -->
|
||||||
<record id="view_school_subject_list" model="ir.ui.view">
|
<record id="view_school_subject_list" model="ir.ui.view">
|
||||||
<field name="name">school.subject.list</field>
|
<field name="name">school.subject.list</field>
|
||||||
|
|
|
@ -1,46 +1,47 @@
|
||||||
<odoo>
|
<odoo>
|
||||||
<record id="view_timeoff_list" model="ir.ui.view">
|
|
||||||
<field name="name">school.course.schedule.list</field>
|
<!-- Inherit Form View: Change Title -->
|
||||||
<field name="model">school.course.schedule</field>
|
<record id="view_hr_leave_form_inherit_course_schedule_title" model="ir.ui.view">
|
||||||
|
<field name="name">hr.leave.form.course.schedule.title</field>
|
||||||
|
<field name="model">hr.leave</field>
|
||||||
|
<field name="inherit_id" ref="hr_holidays.hr_leave_view_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list>
|
<xpath expr="//form" position="attributes">
|
||||||
<field name="course_id"/>
|
<attribute name="string">Course Schedule</attribute>
|
||||||
<field name="day"/>
|
</xpath>
|
||||||
<field name="schedule_time"/>
|
|
||||||
<field name="location"/>
|
|
||||||
<field name="period"/>
|
|
||||||
<field name="status"/>
|
|
||||||
</list>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_timeoff_form" model="ir.ui.view">
|
<!-- Inherit List View: Use Correct ID
|
||||||
<field name="name">school.course.schedule.form</field>
|
<record id="view_hr_leave_list_inherit_course_schedule_title" model="ir.ui.view">
|
||||||
<field name="model">school.course.schedule</field>
|
<field name="name">hr.leave.list.course.schedule.title</field>
|
||||||
|
<field name="model">hr.leave</field>
|
||||||
|
<field name="inherit_id" ref="hr_holidays.hr_leave_view_list"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<xpath expr="//list" position="attributes">
|
||||||
<sheet>
|
<attribute name="string">Course Schedule List</attribute>
|
||||||
<group>
|
</xpath>
|
||||||
<field name="course_id"/>
|
</field>
|
||||||
<field name="day"/>
|
</record> -->
|
||||||
<field name="schedule_time"/>
|
|
||||||
<field name="location"/>
|
<!-- Inherit Calendar View -->
|
||||||
<field name="period"/>
|
<record id="view_hr_leave_calendar_inherit_course_schedule_title" model="ir.ui.view">
|
||||||
<field name="status"/>
|
<field name="name">hr.leave.calendar.course.schedule.title</field>
|
||||||
</group>
|
<field name="model">hr.leave</field>
|
||||||
<div class="oe_button_box d-flex" name="custom_buttons" style="margin: 10px 0; gap: 10px;">
|
<field name="inherit_id" ref="hr_holidays.hr_leave_view_calendar"/>
|
||||||
<button type="object" name="action_send_message" class="btn btn-primary" string="Send Message"/>
|
<field name="arch" type="xml">
|
||||||
<button type="object" name="action_log_note" class="btn btn-secondary" string="Log Note"/>
|
<xpath expr="//calendar" position="attributes">
|
||||||
<button type="object" name="action_schedule_activity" class="btn btn-info" string="Activity"/>
|
<attribute name="string">Course Schedule Calendar</attribute>
|
||||||
</div>
|
</xpath>
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_school_course_schedule" model="ir.actions.act_window">
|
<!-- Action Window -->
|
||||||
|
<record id="action_course_schedule_hr_leave" model="ir.actions.act_window">
|
||||||
<field name="name">Time Off</field>
|
<field name="name">Time Off</field>
|
||||||
<field name="res_model">school.course.schedule</field>
|
<field name="res_model">hr.leave</field>
|
||||||
<field name="view_mode">list,form</field>
|
<field name="view_mode">form,calendar</field>
|
||||||
|
<field name="context">{}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue