diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-10-12 15:59:29 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-10-13 10:22:28 +0200 |
| commit | 8a4bdfb2b18445efcb32c22cedcc69f04845a354 (patch) | |
| tree | 664f6b2f2dc7c00a317151cbcb72fd9fc92a6ba0 | |
| parent | e8b8784d5cafbba11557e1aa46c3a9ee93baa3c2 (diff) | |
[FIX] account: multi-currency reconciliation
Reconcile the following entries :
D C
Amount currency
3.655,52€ +3.872,45$
3.436,80€ -3.872,45$
What Odoo does when I reconcile the 2 entries above using the
"Reconcile" button:
D C
Amount currency
3.655,52€ +3.872,45$
3.436,80€ -3.872,45$
0€ 218,72€ -236,61$
0€ 0€
+236,61$
What Odoo should do :
D C
Amount currency
3.655,52€ +3.872,45$
3.436,80€ -3.872,45$
0€ 218,72€ 0$
opw-687481
| -rw-r--r-- | addons/account/models/account_move.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 48dc26141b8..03d54cdb584 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1071,10 +1071,13 @@ class AccountMoveLine(models.Model): # the provided values were not already multi-currency if account.currency_id and 'amount_currency' not in vals and account.currency_id.id != account.company_id.currency_id.id: vals['currency_id'] = account.currency_id.id - ctx = {} - if 'date' in vals: - ctx['date'] = vals['date'] - vals['amount_currency'] = account.company_id.currency_id.with_context(ctx).compute(amount, account.currency_id) + if self._context.get('skip_full_reconcile_check') == 'amount_currency_excluded': + vals['amount_currency'] = 0.0 + else: + ctx = {} + if 'date' in vals: + ctx['date'] = vals['date'] + vals['amount_currency'] = account.company_id.currency_id.with_context(ctx).compute(amount, account.currency_id) if not ok: raise UserError(_('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal.')) |
