From 6cc8acb4aca5c2ddc7c9d324d16df7e19d17d9bb Mon Sep 17 00:00:00 2001
From: benjamin <benjamin@le-filament.com>
Date: Tue, 27 Jul 2021 17:29:03 +0200
Subject: [PATCH] [update] hide "Cancel Payment" button on payment orders

---
 views/account_payment_order.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/views/account_payment_order.xml b/views/account_payment_order.xml
index cdff3e3..5d7b7c4 100644
--- a/views/account_payment_order.xml
+++ b/views/account_payment_order.xml
@@ -9,6 +9,14 @@
             <field name="model">account.payment.order</field>
             <field name="inherit_id" ref="account_payment_order.account_payment_order_form"/>
             <field name="arch" type="xml">
+                <xpath expr="//button[@name='action_cancel']" position="attributes">
+                    <attribute name="groups">base.group_system,cgscop_patner.group_cg_administrator</attribute>
+                    <attribute name="confirm">Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
+                </xpath>
+                <xpath expr="//button[@name='action_done_cancel']" position="attributes">
+                    <attribute name="groups">base.group_system,cgscop_patner.group_cg_administrator</attribute>
+                    <attribute name="confirm">Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
+                </xpath>
                 <xpath expr="//field[@name='bank_line_count']" position="after">
                     <field name="payment_line_amount"/>
                     <field name="bank_line_amount"/>
-- 
GitLab