I dont know what is the most recommended way to display data from a model (A) in the form of a model (B) [Odoo 11].
So far I've used One2many relations, but in this case I cant (or I dont know how to do it).
I have three models:
class School(models.Model):
_name = 'abby.school'
...
class Agreement(models.Model):
_name = 'abby.agreement'
...
agreement_school = fields.Many2one(comodel_name='abby.school', string='School')
...
class Student(models.Model):
_name = 'abby.student'
...
school = fields.Many2one(comodel_name='abby.school', string='School')
...
Graphically: Agreement > School < Student
I want to display a list of Students in the Agreements form.
Could I use an One2many relation? Or a SELECT in any place? (I'm a beginner in Odoo)
Thank you in advance!!
--- I want to display all the students (could be one or eleven or zero) who belongs to a school with an agreement ---