diff options
| author | qdp-odoo <qdp@odoo.com> | 2018-03-28 10:37:41 +0200 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2018-03-28 10:37:41 +0200 |
| commit | f7971a95c9486f9024ee0b4c0086aa3ce2a99c05 (patch) | |
| tree | 03b2de0ee490953f22e1e36d7ae1b8b72a651d7c | |
| parent | 55a14f9ce8fbca86d8bac075c7f0534c0145531f (diff) | |
[FIX] account: yet another multicurrency fix
function create_exchange_rate_entry() has been build to potentially receive several aml_to_balance (all sharing the same currency_id), hence aml_to_balance.currency_id would be failing in that case since the ORM is expecting a singleton there.
| -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 d7916aaa826..329d06042dc 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1878,7 +1878,7 @@ class AccountPartialReconcile(models.Model): exchange_move = self.env['account.move'].create( self.env['account.full.reconcile']._prepare_exchange_diff_move(move_date=maxdate, company=aml_to_balance[0].company_id)) #eventually create a journal entry to book the difference due to foreign currency's exchange rate that fluctuates - rate_diff_amls, rate_diff_partial_rec = self.create_exchange_rate_entry(aml_to_balance, total_debit - total_credit, total_amount_currency, aml_to_balance.currency_id, exchange_move) + rate_diff_amls, rate_diff_partial_rec = self.create_exchange_rate_entry(aml_to_balance, total_debit - total_credit, total_amount_currency, aml_to_balance[0].currency_id, exchange_move) aml_ids += rate_diff_amls.ids partial_rec_ids += rate_diff_partial_rec.ids exchange_move.post() |
