25 lines
868 B
Python
25 lines
868 B
Python
|
from odoo import models, fields
|
||
|
from odoo.exceptions import UserError
|
||
|
|
||
|
|
||
|
|
||
|
class SchoolCourseAttendance(models.Model):
|
||
|
_name = 'school.course.attendance'
|
||
|
_description = 'Course Attendance'
|
||
|
|
||
|
course_id = fields.Many2one('school.course', string='Course', ondelete='cascade')
|
||
|
student_id = fields.Many2one('res.partner', string='Student')
|
||
|
is_present = fields.Boolean(string='Present')
|
||
|
class_id = fields.Many2one('school.class', string='Class')
|
||
|
|
||
|
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)
|