From bce7da2a3808bf72a5835f28731390bd1995d0d6 Mon Sep 17 00:00:00 2001 From: "Mahdi cheikh rouhou (macr)" Date: Wed, 12 Apr 2023 07:49:58 +0000 Subject: [PATCH] [FIX] account : forbid recipient bank update on posted bill When updating the recipient bank on a posted vendor bill the chnages will not be saved. Steps to reproduce the error: 1-Go to accounting 2-Create a vendor bill and confirm it 3-Change the bank recipient and click manual save 4-Reload and you can see the changes disappeared The error was happening because the recipient bank was not displayed as readonly on a posted state of the account move. opw-3247282 closes odoo/odoo#118783 X-original-commit: 7e7ca95080a601ccf5c0da679aae00a61a9f8ccf Signed-off-by: Quentin De Paoli Signed-off-by: Mahdi Cheikh Rouhou (macr) --- addons/account/views/account_move_views.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index bbd6f6f8f3b..c02f1c29f3e 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -816,7 +816,8 @@ + attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund', 'in_receipt'))], + 'readonly': [('state', '!=', 'draft')]}"/>