25 lines
878 B
Python
25 lines
878 B
Python
from odoo import models, fields
|
|
from odoo.exceptions import UserError
|
|
import base64
|
|
|
|
class SchoolClass(models.Model):
|
|
_name = 'school.class'
|
|
_description = 'Class'
|
|
|
|
name = fields.Char(string='Class Name', required=True)
|
|
subject_ids = fields.Many2many('school.subject', string='Subjects')
|
|
school = fields.Char(string='School')
|
|
is_optional = fields.Boolean(string='Optional')
|
|
class_teacher = fields.Many2one('res.users', string='Class Teacher')
|
|
|
|
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) |