mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-22 21:32:18 -06:00
[document_page_approval] Allow to quickly cancel&draft from 'to approve' state
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user