From b5dab9b119fa37f2f36cc797cfbe83590382e974 Mon Sep 17 00:00:00 2001 From: Valentin Chevalier Date: Fri, 17 Dec 2021 10:22:04 +0000 Subject: [PATCH] [IMP] account_payment: hide pay button when paid Hide the 'Pay Now' button for invoices which transactions total amount equals their total amount. When the total amount of all transactions related to the invoice is equal to or greater than the total amount of said invoice, the 'Pay Now' button should no longer be displayed. task-2527323 closes odoo/odoo#95262 X-original-commit: de81225d39e7951ea9a63e24bab3a0138a6942e3 Signed-off-by: Achraf --- .../account/views/account_portal_templates.xml | 4 ++-- .../views/account_portal_templates.xml | 6 +++--- addons/payment/models/account_move.py | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml index 1626b45aa36..a1c500185e0 100644 --- a/addons/account/views/account_portal_templates.xml +++ b/addons/account/views/account_portal_templates.xml @@ -38,7 +38,7 @@ Invoice # Invoice Date Due Date - Status + Status Amount Due @@ -53,7 +53,7 @@ - + Waiting for Payment diff --git a/addons/account_payment/views/account_portal_templates.xml b/addons/account_payment/views/account_portal_templates.xml index 6e5feb499e4..ed222c82aee 100644 --- a/addons/account_payment/views/account_portal_templates.xml +++ b/addons/account_payment/views/account_portal_templates.xml @@ -1,13 +1,13 @@