From 64c189102efc5534ef351fc267f317d46f2b6d56 Mon Sep 17 00:00:00 2001 From: miquelrosell99 <38435442+miquelrosell99@users.noreply.github.com> Date: Tue, 20 Oct 2026 10:53:39 +0200 Subject: [PATCH 1/2] [FIX] document_page_approval: show 'Cancel' only on draft/to approve for owner or approver The button combined its clauses with 'and', so it was visible whenever the user was owner or approver, in any state (including 'approved' and 'cancelled'), and also for any user while the state was 'draft' or 'to approve'. Match the documented intent ("cancel if i am owner or approver"): the button is now shown to owners or approvers while the revision is draft or to approve. --- document_page_approval/__manifest__.py | 2 +- document_page_approval/views/document_page_approval.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/document_page_approval/__manifest__.py b/document_page_approval/__manifest__.py index a05d537df8a..7dd6f53fd73 100644 --- a/document_page_approval/__manifest__.py +++ b/document_page_approval/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Document Page Approval", - "version": "18.0.1.2.0", + "version": "18.0.1.2.1", "author": "Savoir-faire Linux, Odoo Community Association (OCA)", "website": "https://github.com/OCA/knowledge", "license": "AGPL-3", diff --git a/document_page_approval/views/document_page_approval.xml b/document_page_approval/views/document_page_approval.xml index 87cdf3c4dc4..3936bed3426 100644 --- a/document_page_approval/views/document_page_approval.xml +++ b/document_page_approval/views/document_page_approval.xml @@ -37,7 +37,7 @@ name="action_cancel" type="object" string="Cancel" - invisible="(not am_i_owner or not am_i_approver) and (state not in ('draft', 'to approve'))" + invisible="(not am_i_owner and not am_i_approver) or state not in ('draft', 'to approve')" />