Odoo-Tutorial/education/models/education_student.py
XuanHuyen 6baa855977 init
2025-02-23 01:59:56 +07:00

23 lines
1.1 KiB
Python

from odoo import fields, api, models
class EducationStudent(models.Model):
_name = "education.student"
_description = "Education Student"
name = fields.Char(string='Name', required=True, translate=True)
student_code = fields.Char(string='Student Code', required=True, index=True,
help="Student ID is unique")
class_id = fields.Many2one("education.class", string="Class")
gender = fields.Selection([('male', 'Male'), ('female', 'Female'), ('other', 'Other')],
string='Gender', default='male')
date_of_birth = fields.Date(string='Date of Birth')
age = fields.Integer(string='Age')
active = fields.Boolean(string='Active', default=True)
notes = fields.Text(string='Internal Notes')
attached_file = fields.Binary('Attached File', groups='base.group_user')
description = fields.Html(string='Description', sanitize=True, strip_style=False)
total_score = fields.Float(string='Total Score')
write_date = fields.Datetime(string='Last Updated on')
currency_id = fields.Many2one('res.currency', string='Currency')
amount_paid = fields.Monetary('Amount Paid')