From 7a6b90383069eabe89cae7cde47e709057d8badd Mon Sep 17 00:00:00 2001 From: sofiagvaladze Date: Tue, 13 Dec 2022 13:55:53 +0000 Subject: [PATCH] [FIX] hr_expense: set 'name' and 'expense_line_ids' during report creation Steps to reproduce - Install Accounting - Create user and employee, "user_acc", with Accounting-Accounting and no Expense rights - Take the expense in "To Submit" state for the employee different than user_acc and create report - Save the report. Bug - We get the error that required field 'name' is not set and expense lines disappear. task - 3099142 closes odoo/odoo#107903 X-original-commit: c5765be58dcdb3f6d766e6ce409a6e0f8a82e45b Signed-off-by: Kevin Baptiste --- addons/hr_expense/views/hr_expense_views.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index b4029474ca2..2dc18165ab3 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -717,7 +717,7 @@
@@ -745,7 +745,8 @@ domain="[('state', '=', 'draft'), ('employee_id', '=', employee_id), ('company_id', '=', company_id)]" options="{'reload_on_button': True}" context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'default_company_id': company_id, 'default_employee_id': employee_id}" - attrs="{'readonly': [('is_editable', '=', False)]}"> + attrs="{'readonly': [('is_editable', '=', False)]}" + force_save="1">