17 lines
622 B
Python
17 lines
622 B
Python
from odoo import fields, models
|
|
|
|
class StudentStudent(models.Model):
|
|
_name = 'student.student'
|
|
_description = 'Student Management'
|
|
|
|
name = fields.Char(string='Tên học sinh', required=True)
|
|
student_id = fields.Char(string='Mã học sinh', unique=True)
|
|
birth_date = fields.Date(string='Ngày sinh')
|
|
gender = fields.Selection([
|
|
('male', 'Nam giới'),
|
|
('female', 'Nữ giới')
|
|
])
|
|
email = fields.Char(string='Email', required=True, unique=True)
|
|
phone = fields.Char(string='Số điện thoại')
|
|
course_ids = fields.Many2many('student.course', string='Môn học')
|