# -*- coding: utf-8 -*-
from odoo import api, fields, models


class Exam(models.Model):

    _name = 'xh.exam'
    stu_name = fields.Many2one('res.users', string='学生姓名', ondelete='cascade')
    subject = fields.Char(string="科目", required=True)
    score = fields.Integer(string="分数", required=False)
    t_name = fields.Many2one('xh.teacher', string='老师姓名')
bbc1e2ce3b52b43afe34a3b3ee6555a5b63ea132
<mask token>

<mask token>


class Exam(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Exam(models.Model):
    _name = 'xh.exam'
    stu_name = fields.Many2one('res.users', string='学生姓名', ondelete='cascade')
    subject = fields.Char(string='科目', required=True)
    score = fields.Integer(string='分数', required=False)
    t_name = fields.Many2one('xh.teacher', string='老师姓名')

from odoo import api, fields, models


class Exam(models.Model):
    _name = 'xh.exam'
    stu_name = fields.Many2one('res.users', string='学生姓名', ondelete='cascade')
    subject = fields.Char(string='科目', required=True)
    score = fields.Integer(string='分数', required=False)
    t_name = fields.Many2one('xh.teacher', string='老师姓名')

# -*- coding: utf-8 -*-
from odoo import api, fields, models


class Exam(models.Model):

    _name = 'xh.exam'
    stu_name = fields.Many2one('res.users', string='学生姓名', ondelete='cascade')
    subject = fields.Char(string="科目", required=True)
    score = fields.Integer(string="分数", required=False)
    t_name = fields.Many2one('xh.teacher', string='老师姓名')