Repository
OCA/knowledge · module folder · Try on Runboat
Module version
1.0.0
Category
Knowledge Management
Folder size
1.33 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/knowledge
Last tracking update
2026-08-07 09:06:26
Authors
Savoir-faire Linux, Odoo Community Association (OCA)
Maintainers
Savoir-faire Linux, Odoo Community Association (OCA)
Committers
Weblate, OCA-git-bot, oca-ci, Bhavesh Heliconia
Odoo dependencies
OCA/knowledge:
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None
Description
This module adds a workflow to approve page modifications and show the
approved version by default.

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
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_approver Boolean
    compute='_compute_am_i_approver'
  • approval_required Boolean
    help='Require approval for changes on this page or its child pages.' args: 'Require approval'
  • approved_date Datetime
    index=True related='history_head.approved_date' store=True args: 'Approved Date'
  • approved_uid Many2one → res.users
    index=True related='history_head.approved_uid' store=True args: 'res.users', 'Approved by'
  • approver_gid Many2one → res.groups
    help='Users must also belong to the Approvers group' args: 'res.groups', 'Approver group'
  • approver_group_ids Many2many → res.groups
    compute='_compute_approver_group_ids' help='Groups that can approve changes to this document' recursive=True string='Approver groups' args: 'res.groups'
  • has_changes_pending_approval Boolean
    compute='_compute_has_changes_pending_approval' string='Has changes pending approval'
  • history_ids One2many
    domain=[('state', '=', 'approved')]
  • is_approval_required Boolean
    compute='_compute_is_approval_required' help='If true, changes of this page require approval' recursive=True args: 'Approval required'
  • user_has_drafts Boolean
    compute='_compute_user_has_drafts' string='User has drafts?'
Public methods (2)
  • 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_approver Boolean
    related='page_id.am_i_approver' related_sudo=False
  • am_i_owner Boolean
    compute='_compute_am_i_owner'
  • approved_date Datetime
  • approved_uid Many2one → res.users
    args: 'res.users', 'Approved by'
  • is_approval_required Boolean
    related='page_id.is_approval_required' string='Approval required'
  • page_url Text
    compute='_compute_page_url' string='URL'
  • state Selection
    default='draft' readonly=True args: [('draft', 'Draft'), ('to approve', 'Pending Approval'), ('approved', 'Approved'), ('cancelled', 'Cancelled')], 'Status'
Public methods (5)
  • 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…