0
votes

I want to do a functionality :"a student can inscript a course, or a teacher can choose a course to teach". Here is my python code: Class SinhVien (student)

Class KhoaHoc(course)

Class GiaoVien (Teacher)

Class PhongHoc (classroom)

Running odoo : A teacher want to choose a course to teach He/she has to fill the name and the ID, and click "Add an item" below to select a course

Selecting a course

enter image description here Click blue button "save" above, and it causes an error

I don't know clearly why relation "lop_phu_trach" does not exist even though I initialized it in the model "studentmanagement.khoahoc"

Thanks for your help in advanced

2

2 Answers

1
votes

I've resolved it, in model "studentmanagement.giaovien", I change to

LopPhuTrach = fields.Many2many('studentmanagement.khoahoc', string="Chọn lớp")
0
votes

You don't have lop_phu_trach in your studentmanagement.khoahoc model. What you have is LopPhuTrach.

Try changing lop_phu_trach to LopPhuTrach.