Odoo Help


automatically display many2one fields

on 6/2/16, 3:01 AM 613 views


i have two fields like

class_name = fields.Many2one('class.name')

students = fields.Many2one('all.class.student', string ="Students" , related='class_name.name')

here if i select class name like 12th class then automatically only 12th class students should display but i give filter in code but thats not working,my code displaying whole classes's students name

why you have create it , related='class_name.name' name is the character fields

webkul, Prakash Sharma
on 6/2/16, 6:42 AM
ayman mohammed adam
On 6/2/16, 8:05 AM


students = fields.Many2one('all.class.student', string ="Students" , related='class_name.YOUR MANY2ONE FIELD')

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/2/16, 3:01 AM
Seen: 613 times
Last updated: 6/2/16, 8:05 AM