odoo_18_Education_management/models/school_user.py

16 lines
492 B
Python
Raw Normal View History

2025-07-29 05:25:05 +00:00
from odoo import models, fields, api
class SchoolUser(models.Model):
_name = 'school.user'
_description = 'School User'
name = fields.Char(string="Name", required=True)
login = fields.Char(string="Login", required=True)
password = fields.Char(string="Password", required=True)
role = fields.Selection([
('admin', 'Admin'),
('teacher', 'Teacher'),
('parent', 'Parent'),
('student', 'Student'),
], required=True, default='student')