From b9ce1affbf55bb81dde718af435e4763bd19c80c Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Tue, 24 Apr 2018 12:10:06 +0200 Subject: [PATCH] [REV] account: reverts commit 0351b492d55e297699a6881e10500d007bd7e10f. Unexpected runbot failure detected. Pach reverted for further investigation. Sorry for the disturbance --- addons/account/models/account_move.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 11f83b3fd36..727bdf298ae 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1135,15 +1135,13 @@ class AccountMoveLine(models.Model): #create an empty move that will hold all the exchange rate adjustments exchange_move = False - if aml_to_balance_currency and any([residual for dummy, residual in aml_to_balance_currency.values()]): + if aml_to_balance_currency: exchange_move = self.env['account.move'].create( self.env['account.full.reconcile']._prepare_exchange_diff_move(move_date=maxdate, company=self[0].company_id)) for currency, values in aml_to_balance_currency.items(): aml_to_balance = values[0] total_amount_currency = values[1] - if not total_amount_currency: - continue #eventually create journal entries to book the difference due to foreign currency's exchange rate that fluctuates aml_recs, partial_recs = self.env['account.partial.reconcile'].create_exchange_rate_entry(aml_to_balance, 0.0, total_amount_currency, currency, exchange_move)