Skip to content

Commit

Permalink
[FIX] hr_expense: fix payment entry of expenses paid by company
Browse files Browse the repository at this point in the history
Create an expense paid directly by the company, validate and post entries.
While the account move lines are correct, the payment is not: it is always null.

opw 1962500

closes #32956

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
  • Loading branch information
Nans Lefebvre committed Apr 25, 2019
1 parent 61f82c0 commit b7f4ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/hr_expense/models/hr_expense.py
Expand Up @@ -365,7 +365,7 @@ def action_move_create(self):
# get move line values
move_line_values = move_line_values_by_expense.get(expense.id)
move_line_dst = move_line_values[-1]
total_amount = abs(move_line_dst['debit'])
total_amount = move_line_dst['debit'] or -move_line_dst['credit']
total_amount_currency = move_line_dst['amount_currency']

# create one more move line, a counterline for the total on payable account
Expand Down

0 comments on commit b7f4ff4

Please sign in to comment.