From 1dde60d1b4307cfd767e028609c65179e52732fd Mon Sep 17 00:00:00 2001 From: "Dylan Kiss (dyki)" Date: Fri, 7 Oct 2022 09:43:27 +0000 Subject: [PATCH] [FIX] hr_expense: set the expense account and employee on generated move lines Currently, when posting accounting entries from an expense report, the accounts set on the expense entries were not taken over in the account move lines. Also, the employee was not set as the vendor of the purchase receipt (account move). This PR makes sure that both the accounts on the expenses, as well as the vendor (employee) is set on the account move created from an expense report. Tests added as well. closes odoo/odoo#103037 X-original-commit: 066c70e483b2f49ae48cb98ddc412014f4fe258a Signed-off-by: Quentin De Paoli --- addons/hr_expense/models/hr_expense.py | 2 + addons/hr_expense/tests/test_expenses.py | 116 ++++++++++++++++++++++- 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 78dfa91c7d0..7b4d934ca16 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -591,6 +591,7 @@ Or send your receipts at