From 2a0ef92a1e7a0a43b0a20969b8548c4f12eb402d Mon Sep 17 00:00:00 2001 From: anhe-odoo Date: Wed, 10 Nov 2021 07:52:23 +0000 Subject: [PATCH] [FIX] hr_expense: Make expense lines readonly on report Expected Behaviour When creating a journal entry for an expense, the journal shouldn't be editable once it has been submitted for approval. Observed Behaviour Even when the journal entry has been validated by the manager, the list of expenses is still editable, which can cause serious trouble. Reproducibility This bug can be reproduced following these steps: - Create a new expense - Create the related journal entry (Create report) - Submit the report for approval - Validate the report - Try to edit the expenses list Problem Root Cause As it can be seen in the PR, this issue came from the fact the expense list isn't in read-only mode Related Issue(s) opw-2659436 closes odoo/odoo#79915 Signed-off-by: Yannick Tivisse (yti) --- addons/hr_expense/views/hr_expense_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index 945aa0d69d5..3decd204b9c 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -720,7 +720,7 @@ - +