def onchange_template(self):
        if not self.template_task_id:
            return
        copy_data_default = {
            'project_id': self.project_id.id,
            'partner_id': self.partner_id.id,
            'company_id': self.company_id.id,
            'child_ids': False,
        }
        data = self.template_task_id.copy_data(copy_data_default)
        for k, v in data[0].items():
            self[k] = v

        childs = []
        copy_data_default['project_id'] = self.subtask_project_id.id
        for child in self.template_task_id.child_ids:
            childs.append((0, 0, child.copy_data(copy_data_default)[0]))
        self.child_ids = childs