From 65a89b4d5776bf64bad6b9988e77e67bb6ebf8d3 Mon Sep 17 00:00:00 2001 From: Brice bib Bartoletti Date: Fri, 10 Dec 2021 16:42:28 +0000 Subject: [PATCH] [FIX] account: remove readonly on auto_post The aim of this commit is to allow user to post a reversed entry even when the date for the reversed has been set in the future. before this commit: if the move is generated using the reverse entry button and a date in the future, the reverse entry is created with auto_post True and is readonly in the view resulting in the user being unable to post the move himself. after this commit: auto_post can be manually set to false and the user can post the move himself. closes odoo/odoo#83029 Task: #2522640 X-original-commit: 40b7976de1fe1cae71eb1063188eacb9a8a8fb70 Signed-off-by: Olivier Colson Signed-off-by: Brice Bartoletti --- addons/account/views/account_move_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 8801b96dbe7..d204f65b7a1 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -1228,7 +1228,7 @@ widget="email" attrs="{'invisible': ['|', ('move_type', 'not in', ('in_invoice', 'in_refund')), ('invoice_source_email', '=', False)]}"/> + attrs="{'readonly': [('state','!=','draft')]}"/> @@ -1238,7 +1238,7 @@ + attrs="{'invisible': [('move_type', '!=', 'entry')], 'readonly': [('state','!=','draft')]}"/>