From 1843a1ae4da551ecfbcc71d223e583e1fff04e41 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 10 Dec 2020 16:00:10 +0000 Subject: [PATCH] [FIX] hr_expense: wrong company account when creating from mail In a multicompany environment, when a expense is created from the expense email alias, the expense account is computed with SUPERUSER context, so depending on the SUPERUSER set company, we could get a mismatch of expense and employee's company and the account one, wich causes a subsequent error when trying to post the expense. closes odoo/odoo#65413 X-original-commit: da758c44b19a9339f0c0b1b6a74c11e3e5491a64 Signed-off-by: Simon Goffin (sig) Co-authored-by: simongoffin --- addons/hr_expense/models/hr_expense.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 8d27515509b..e64a4c08c48 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -667,6 +667,10 @@ Or send your receipts at