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:
Running odoo : A teacher want to choose a course to teach
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
我已经解决了,在模型“ studentmanagement.giaovien”中,我更改为
LopPhuTrach = fields.Many2many('studentmanagement.khoahoc', string="Chọn lớp")
You don't have lop_phu_trach
in your studentmanagement.khoahoc
model. What you have is LopPhuTrach
.
Try changing lop_phu_trach
to LopPhuTrach
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.