While open an existing record , How I fill or update the default value for One2many field?
I tried ,Ex:
def _get_task_stages(self):
task_ids = self.env["project.task.stages"].search([('case_default','=',1)])
res = []
for j in task_ids:
values ={'name':j.name}
res.append((0,0,values))
return res
type_line = fields.One2many('project.new.task.type','project_id','Project Stages',default = _get_task_stages)
but the above code call only when create a new record.How I update the default value on all existing records.