From 4fd62d2639336b6deeaf352ca89c70bdb475cbfd Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 25 Jan 2022 10:44:16 +0000 Subject: [PATCH] [FIX] l10n_fr_pos_cert: Fix bad xpath making everything editable When installing 'l10n_fr_pos_cert', some fields become always editables on the bank statement form even the state is not in 'open'. This allows the user to introduce a lot of unconsistencies regarding the bank statement balances. closes odoo/odoo#83348 X-original-commit: cb49944f3c980fa22131713fd96cf7bcbdc757be Signed-off-by: Olivier Colson Signed-off-by: Laurent Smet --- addons/l10n_fr_pos_cert/views/account_views.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_fr_pos_cert/views/account_views.xml b/addons/l10n_fr_pos_cert/views/account_views.xml index 27d4d2e9d9b..94be33418a3 100644 --- a/addons/l10n_fr_pos_cert/views/account_views.xml +++ b/addons/l10n_fr_pos_cert/views/account_views.xml @@ -12,13 +12,13 @@ {'readonly': [('pos_session_id', '!=', False)]} - {'readonly': [('pos_session_id', '!=', False)]} + {'readonly': ['|', ('move_line_count','!=', 0), ('pos_session_id', '!=', False)]} - {'readonly': [('pos_session_id', '!=', False)]} + {'readonly': ['|', ('state', '!=', 'open'), ('pos_session_id', '!=', False)]} - {'readonly': [('pos_session_id', '!=', False)]} + {'readonly': ['|', ('state', '!=', 'open'), ('pos_session_id', '!=', False)]}