summaryrefslogtreecommitdiff
path: root/addons/account
diff options
context:
space:
mode:
authorWolfgang Taferner <wolfgang.taferner@wt-io-it.at>2021-01-11 13:33:28 +0000
committerLaurent Smet <las@odoo.com>2021-01-20 07:07:37 +0000
commit0f36bbd257ba5e8e03462f675d81fdbdece1893a (patch)
tree9076daf6b71ffabed247a233b20b0443f63f63ff /addons/account
parentfe19b48831df17352ea7dbb0b7fa2497ac2da38f (diff)
[FIX] account/purchase: onchange on purchase create bill does not work
closes odoo/odoo#64502 X-original-commit: 48120a587c70d7b50c21791bba902c4d77bb8c79 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/account')
-rw-r--r--addons/account/models/account_move.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index db3dde0e640..eabd1cdcc2a 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -945,7 +945,8 @@ class AccountMove(models.Model):
# Recompute amls: update existing line or create new one for each payment term.
new_terms_lines = self.env['account.move.line']
for date_maturity, balance, amount_currency in to_compute:
- if self.journal_id.company_id.currency_id.is_zero(balance) and len(to_compute) > 1:
+ currency = self.journal_id.company_id.currency_id
+ if currency and currency.is_zero(balance) and len(to_compute) > 1:
continue
if existing_terms_lines_index < len(existing_terms_lines):