Dear all,
I have field tag_ids configured on the project.project model.
I then want to create new tasks and want to copy the tag_ids from project.project to the respective new task as default values.
I tried many different ways but I don't get it to work.
Could you please help me out.
class TaskTemplating(models.Model):
_inherit = 'project.project'
tags_ids = fields.Many2many('project.tags',
string="Stichwörter")
class DescriptionTemplate(models.Model):
_inherit = 'project.task'
api.model
def default_get(self, vals):
task = super(DescriptionTemplate, self).default_get(vals)
task.update({
'tag_ids' : self.env['project.task'].project_id._context.get('tag_ids'),
})
return task
I would truly appreciate your help