[document_page_approval] Allow to quickly cancel&draft from 'to approve' state

This commit is contained in:
Iván Todorovich
2018-04-24 20:07:07 -03:00
parent dce03abb17
commit 3a142e7ba2
2 changed files with 9 additions and 0 deletions

View File

@@ -139,6 +139,12 @@ class DocumentPageHistory(models.Model):
) % (rec.display_name, self.env.user.name)
)
@api.multi
def action_cancel_and_draft(self):
"""Set a change request as draft, cancelling it first"""
self.action_cancel()
self.action_draft()
@api.multi
def _compute_am_i_owner(self):
"""Check if current user is the owner"""