You should use an on_change_with_<field_name> method in order to set the value when the relation field is set.
This way, each time a new record is created in the One2Many, the relation field will be set by the client and your on_change method will be called to set the values.