[REV] account: reverts commit 0351b492d5.

Unexpected runbot failure detected. Pach reverted for further investigation. Sorry for the disturbance
This commit is contained in:
qdp-odoo
2018-04-24 12:10:06 +02:00
parent 0351b492d5
commit b9ce1affbf
+1 -3
View File
@@ -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)