[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 <smetl@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user