Skip to content

Commit

Permalink
Add log for deletion or creation of signature
Browse files Browse the repository at this point in the history
  • Loading branch information
cubells committed Jul 13, 2017
1 parent fe74a29 commit 95a74e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion project_task_digitized_signature/i18n/es.po
Expand Up @@ -183,4 +183,3 @@ msgstr "Tarea"
#: model:ir.actions.report.xml,name:project_task_digitized_signature.report_taskorder
msgid "Task Order"
msgstr "Tarea"

13 changes: 13 additions & 0 deletions project_task_digitized_signature/models/project.py
Expand Up @@ -40,3 +40,16 @@ def action_task_send(self):
'target': 'new',
'context': ctx,
}

@api.model
def create(self, values):
task = super(ProjectTask, self).create(values)
if task.customer_signature:
values = {'customer_signature': task.customer_signature}
task._track_signature(values, 'customer_signature')
return task

@api.multi
def write(self, values):
self.env['mail.thread']._track_signature(values, 'customer_signature')
return super(ProjectTask, self).write(values)

0 comments on commit 95a74e9

Please sign in to comment.