diff --git a/account_invoice_show_currency_rate/models/account_move.py b/account_invoice_show_currency_rate/models/account_move.py index f367e9e14d0..bf6688c92c1 100644 --- a/account_invoice_show_currency_rate/models/account_move.py +++ b/account_invoice_show_currency_rate/models/account_move.py @@ -51,7 +51,9 @@ def _compute_currency_rate(self): for line in self: if line.move_id.state != "posted" or not line.amount_currency: continue - line.currency_rate = line.currency_id.round( - abs(line.amount_currency) / abs(line.balance) + line.currency_rate = ( + line.currency_id.round(abs(line.amount_currency) / abs(line.balance)) + if line.balance + else 0 ) return res