Document Page Approval
document_page_approval · OCA/knowledge
Health
75/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 8 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 13 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
1.33 MB
Module directory on disk
Code analysis
1 migration note
2 models
7 views
0 HTTP endpoints
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE document_page_history SET state='approved', approved_uid=create_uid, approved_date=create_date WHERE state IS NULL OR state = 'draft'` - re-check the table/column names still match after upgrading. (2 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module adds a workflow to approve page modifications and show the approved version by default.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_category_form_inherit |
document.page.category.form | document.page | form | Inherits document_page.view_category_form |
view_wiki_history_filter |
document.page.history.search | document.page.history | search | Inherits document_page.view_wiki_history_filter |
view_wiki_history_tree_inherit |
document.page.history.tree | document.page.history | list | Inherits document_page.view_wiki_history_tree |
view_wiki_menu_form_inherit |
document.page.form | document.page | form | Inherits document_page.view_wiki_menu_form |
wiki_form_inherit |
document.page.form | document.page | form | Inherits document_page.view_wiki_form |
wiki_history_form_inherit |
document.page.history.form | document.page.history | form | Inherits document_page.wiki_history_form |
wiki_history_form_inherit_manager |
document.page.history.form | document.page.history | form | Inherits wiki_history_form_inherit |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
New fields (10)
-
am_i_approverBooleancompute='_compute_am_i_approver' -
approval_requiredBooleanhelp='Require approval for changes on this page or its child pages.' args: 'Require approval' -
approved_dateDatetimeindex=Truerelated='history_head.approved_date'store=True args: 'Approved Date' -
approved_uidMany2one → res.usersindex=Truerelated='history_head.approved_uid'store=True args: 'res.users', 'Approved by' -
approver_gidMany2one → res.groupshelp='Users must also belong to the Approvers group' args: 'res.groups', 'Approver group' -
approver_group_idsMany2many → res.groupscompute='_compute_approver_group_ids'help='Groups that can approve changes to this document'recursive=Truestring='Approver groups' args: 'res.groups' -
has_changes_pending_approvalBooleancompute='_compute_has_changes_pending_approval'string='Has changes pending approval' -
history_idsOne2manydomain=[('state', '=', 'approved')] -
is_approval_requiredBooleancompute='_compute_is_approval_required'help='If true, changes of this page require approval'recursive=True args: 'Approval required' -
user_has_draftsBooleancompute='_compute_user_has_drafts'string='User has drafts?'
-
action_changes_pending_approval(self) -
can_user_approve_this_page(self, user)Check if a user can approve this page.
New fields (7)
-
am_i_approverBooleanrelated='page_id.am_i_approver'related_sudo=False -
am_i_ownerBooleancompute='_compute_am_i_owner' -
approved_dateDatetime -
approved_uidMany2one → res.usersargs: 'res.users', 'Approved by' -
is_approval_requiredBooleanrelated='page_id.is_approval_required'string='Approval required' -
page_urlTextcompute='_compute_page_url'string='URL' -
stateSelectiondefault='draft'readonly=True args: [('draft', 'Draft'), ('to approve', 'Pending Approval'), ('approved', 'Approved'), ('cancelled', 'Cancelled')], 'Status'
-
action_approve(self)Set a change request as approved. -
action_cancel(self)Set a change request as cancelled. -
action_cancel_and_draft(self)Set a change request as draft, cancelling it first -
action_draft(self)Set a change request as draft -
action_to_approve(self)Set a change request as to approve
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…