summaryrefslogtreecommitdiff
path: root/addons/account/models/account_bank_statement.py
diff options
context:
space:
mode:
authorLaurent Smet <las@odoo.com>2020-07-23 08:42:04 +0000
committerLaurent Smet <las@odoo.com>2020-07-30 08:48:37 +0000
commit17a8a6d933d701db7bff8f4d17e10ae03fc57ac2 (patch)
tree30891819b0d4218d8b81e74406650c99dae414c0 /addons/account/models/account_bank_statement.py
parent78aae948381e852d5b2e1657882c8f0a1b3cd4c9 (diff)
[FIX] account: Fix missing 'currency_id' on statement lines with amount_currency=0.0
The `currency_id` must be set whatever the amount_currency is zero or not. X-original-commit: 88065aef326dcbe0fb821da8d9aa6cc0316615c7
Diffstat (limited to 'addons/account/models/account_bank_statement.py')
-rw-r--r--addons/account/models/account_bank_statement.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index 68ae1d97503..fd5489ad707 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -587,11 +587,11 @@ class AccountBankStatementLine(models.Model):
'name': self.payment_ref,
'move_id': self.move_id.id,
'partner_id': self.partner_id.id,
- 'currency_id': currency_id if amount_currency else False,
+ 'currency_id': currency_id,
'account_id': journal.default_debit_account_id.id if balance >= 0 else journal.default_credit_account_id.id,
'debit': balance > 0 and balance or 0.0,
'credit': balance < 0 and -balance or 0.0,
- 'amount_currency': amount_currency if currency_id else False,
+ 'amount_currency': amount_currency,
}
@api.model
@@ -772,7 +772,7 @@ class AccountBankStatementLine(models.Model):
'name': counterpart_vals.get('name', move_line.name if move_line else ''),
'move_id': self.move_id.id,
'partner_id': self.partner_id.id,
- 'currency_id': currency_id if amount_currency else False,
+ 'currency_id': currency_id,
'account_id': counterpart_vals.get('account_id', move_line.account_id.id if move_line else False),
'debit': balance if balance > 0 else 0.0,
'credit': -balance if balance < 0 else 0.0,