diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-08-22 11:21:23 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-08-22 11:21:23 +0200 |
| commit | 4833aeb960fdf72bbb55721c3e2f4c83b27d2cbd (patch) | |
| tree | 18f447b7a4c719b56dc9117afe31800ac8bed1eb /addons | |
| parent | 668c360e32b4130966eddc8ed28b6cb4e66055aa (diff) | |
| parent | ab8c564f44159cfef302412df6b2c6602f5d45df (diff) | |
[MERGE] forward port branch 11.0 up to ab8c564f441
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/models/account_move.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 29bd05b70ad..6c820d7ad1b 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -519,7 +519,7 @@ class AccountMoveLine(models.Model): 'line_ids', self._context['line_ids'], fields=['credit', 'debit']): balance += line.get('debit', 0) - line.get('credit', 0) # if we are here, line_ids is in context, so journal_id should also be. - currency = self._context.get('journal_id') and self.browse(self._context['journal_id']).company_id.currency_id + currency = self._context.get('journal_id') and self.env["account.journal"].browse(self._context['journal_id']).company_id.currency_id if currency: balance = currency.round(balance) if balance < 0: |
