I want to set default value for multiple fields while creating records from one2many field, in that default value will be taken from the parent model.
Odoo M
To send parent value to one2many field define context on one2many field in XML, to use context append "default_" as prefix to desired field e.g. "default_state" as a key and for value use parent table field name.
In above code snippet we have one2many field and in that field we define context with key value. Here name of key will starts from "default_" and than the field name, the value should be the parent table field name which we want to display in one2many pop up form view. For further info http://learnopenerp.blogspot.com/2018/01/get-parent-form-value-in-one2many-form.html