Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想做一个功能:“学生可以写一门课程,或者老师可以选择一门课程来教”。这是我的python代码:
Running odoo : 一位老师想选择一门课程来教授
我不清楚为什么关系“lop_phu_trach”不存在,即使我在模型“studentmanagement.khoahoc”中对其进行了初始化
感谢您在高级方面的帮助
我已经解决了,在模型“studentmanagement.giaovien”中,我改为
LopPhuTrach = fields.Many2many('studentmanagement.khoahoc', string="Chọn lớp")
你lop_phu_trach的studentmanagement.khoahoc模型中没有。你所拥有的是LopPhuTrach.
lop_phu_trach
studentmanagement.khoahoc
LopPhuTrach
尝试更改lop_phu_trach为LopPhuTrach.