I have a class `student_student` which have a one2many field`result_ids` defined like the following:

```
    result_ids = fields.One2many("schoolresults.detail", "student_id", "School Results", default="_get_subjects")

```

and 

```
def _get_subjects(self):
     cr = self.pool.cursor()
     self.env
     return self.pool.get('schoolresults.subject').search(cr, self.env.uid, [])

```

in the other side I have a class `schoolresults_subject`:

```
class schoolresults_subject(models.Model):
    _name = "schoolresults.subject"
    _description = "Student's subjects."
    name = fields.Char("Subject")

class schoolresults_detail(models.Model):
    _name = "schoolresults.detail"
    _description = "Student's results."
    student_id = fields.Many2one("student.student", "Student", ondelete="cascade")
    subject_id = fields.Many2one("schoolresults.subject", "Subject")
    result = fields.Float("Result", compute='_compute_value', store=True)

```

What I'm trying to do is to fill the result\_ids with a subjects list from the last class, whenever the user trying to create a new student profile, using the the `default` parameter in the one2many field.
But whenever I try to create a student profile I get this error `Wrong values for student.student.result_ids`.
Please is there anyway to achieve that?
[![enter image description here](https://i.stack.imgur.com/j2m2N.png)](https://i.stack.imgur.com/j2m2N.png)

**PS. I'm using Odoo 9**