Mathieu Benoit
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
project_task_attachments/models/ir_attachment.py
|
|
@ -53,7 +53,8 @@ class IrAttachment(models.Model): |
|
|
|
'project.project'): |
|
|
|
vals['project_id'] = vals['res_id'] |
|
|
|
vals['attach_to'] = 'project' |
|
|
|
else: |
|
|
|
elif ('task_id' not in vals.keys() and vals['res_model'] == |
|
|
|
'project.task'): |
|
|
|
vals['task_id'] = vals['res_id'] |
|
|
|
vals['attach_to'] = 'task' |
|
|
|
return super().create(vals_list) |
|
|
|