[FIX+IMP] document_page_approval:

* Rename classes and files to match model names, and removed workflow engine.
* Some fields should be readonly if not in draft.
* Allow Knowledge / Manager to edit previous history names and summary
* Improve ux by adding user_has_drafts to document pages.
* Changes because of implementation of active field on document_page
* Add ir.rules for document.page.history
* Allow to quickly cancel&draft from 'to approve' state
* FIX BUG: am_i_approver was being run as sudo(), hence always giving the user Approving rights.
* FIX hooks
  Because of default='draft' on the state field, state IS NULL wasn't selecting anything.
  Left the condition in case this is changed in the future.
This commit is contained in:
Iván Todorovich
2018-04-20 10:42:49 -03:00
committed by Pedro M. Baeza
parent 06c6915dcc
commit f9bc09d56f
9 changed files with 198 additions and 94 deletions

View File

@@ -46,6 +46,12 @@ msgid "\n"
" "
msgstr ""
#. module: document_page_approval
#: model:ir.ui.view,arch_db:document_page_approval.wiki_form_inherit
msgid "<b>You already have a Draft Change Request for this page.</b>\n"
" It is highly recommended that you edit that one instead of creating a new one."
msgstr ""
#. module: document_page_approval
#: model:ir.model.fields,field_description:document_page_approval.field_document_page_am_i_approver
#: model:ir.model.fields,field_description:document_page_approval.field_document_page_history_am_i_approver
@@ -107,6 +113,18 @@ msgstr ""
msgid "Back to draft"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history.py:100
#, python-format
msgid "Can't approve page in '%s' state."
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history.py:76
#, python-format
msgid "Can't approve pages in '%s' state."
msgstr ""
#. module: document_page_approval
#: model:ir.ui.view,arch_db:document_page_approval.wiki_history_form_inherit
msgid "Cancel"
@@ -126,13 +144,13 @@ msgid "Change Requests"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:129
#: code:addons/document_page_approval/models/document_page_history.py:138
#, python-format
msgid "Change request <b>%s</b> has been cancelled by %s."
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:110
#: code:addons/document_page_approval/models/document_page_history.py:119
#, python-format
msgid "Change request has been approved by %s."
msgstr ""
@@ -169,25 +187,13 @@ msgstr ""
msgid "If true, changes of this page require approval"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:59
#, python-format
msgid "It's not cancelled or approved"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:71
#, python-format
msgid "It's not in draft state"
msgstr ""
#. module: document_page_approval
#: model:mail.template,subject:document_page_approval.email_template_new_draft_need_approval
msgid "New version of ${object.display_name} needs your approval"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:117
#: code:addons/document_page_approval/models/document_page_history.py:126
#, python-format
msgid "New version of the document %s approved."
msgstr ""
@@ -238,14 +244,40 @@ msgstr ""
msgid "URL"
msgstr ""
#. module: document_page_approval
#: model:ir.model.fields,field_description:document_page_approval.field_document_page_user_has_drafts
msgid "User has drafts?"
msgstr ""
#. module: document_page_approval
#: model:ir.model.fields,help:document_page_approval.field_document_page_approver_gid
msgid "Users must also belong to the Approvers group"
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history_workflow.py:62
#: code:addons/document_page_approval/models/document_page_history.py:102
#, python-format
msgid "You are not an appover to reset to draft"
msgid "You are not authorized to do this.
\n"
"Only approvers with these groups can approve this: "
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history.py:62
#, python-format
msgid "You are not authorized to do this.
\n"
"Only owners or approvers can reopen Change Requests."
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history.py:79
#, python-format
msgid "You are not authorized to do this.
\n"
"Only owners or approvers can request approval."
msgstr ""
#. module: document_page_approval
#: code:addons/document_page_approval/models/document_page_history.py:59
#, python-format