[FIX] hr_expense: assign tags to move lines when using taxes on expenses

Before that, tags were not set at all on base and tax lines.

closes odoo/odoo#34376

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
Olivier Colson
2019-07-03 14:20:26 +00:00
parent 40421be73c
commit 91a549dea6
+2
View File
@@ -313,6 +313,7 @@ class HrExpense(models.Model):
'expense_id': expense.id,
'partner_id': partner_id,
'tax_ids': [(6, 0, expense.tax_ids.ids)],
'tag_ids': [(6, 0, taxes['base_tags'])],
'currency_id': expense.currency_id.id if different_currency else False,
}
move_line_values.append(move_line_src)
@@ -334,6 +335,7 @@ class HrExpense(models.Model):
'amount_currency': amount_currency if different_currency else 0.0,
'account_id': tax['account_id'] or move_line_src['account_id'],
'tax_repartition_line_id': tax['tax_repartition_line_id'],
'tag_ids': tax['tag_ids'],
'tax_base_amount': tax['base'],
'expense_id': expense.id,
'partner_id': partner_id,