From 84cc6fab9e9c31adc826846f405449a060800b8b Mon Sep 17 00:00:00 2001 From: "Simon Genin (ges)" Date: Thu, 11 Jun 2020 09:33:17 +0000 Subject: [PATCH] [FIX] hr_expense: remove traceback when post entry The `state` field of `account.payment` no longer exists and should not be set explicitely. Set the `ref` field to the expense name instead of the `name`field. Task ID 2266922 closes odoo/odoo#52823 Signed-off-by: Laurent Smet --- addons/hr_expense/models/hr_expense.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 9bd642c754b..aabfbfe183b 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -514,10 +514,9 @@ class HrExpense(models.Model): 'partner_type': 'supplier', 'journal_id': journal.id, 'date': expense.date, - 'state': 'reconciled', 'currency_id': expense.currency_id.id if different_currency else journal_currency.id, 'amount': abs(total_amount_currency) if different_currency else abs(total_amount), - 'name': expense.name, + 'ref': expense.name, }) move_line_dst['payment_id'] = payment.id