Merge pull request #618 from grindtildeath/10.0_fix_credit_control_aml_currency

[10.0][Fix] account_credit_control : Do not ignore lines with company currency defined
This commit is contained in:
Pedro M. Baeza
2018-02-23 00:46:41 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
# Copyright 2017 Okia SPRL (https://okia.be)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Account Credit Control',
'version': '10.0.1.3.2',
'version': '10.0.1.3.3',
'author': "Camptocamp,Odoo Community Association (OCA),Okia",
'maintainer': 'Camptocamp',
'category': 'Finance',

View File

@@ -181,7 +181,8 @@ class CreditControlLine(models.Model):
new_lines = self.browse()
for move_line in lines:
if move_line.currency_id:
ml_currency = move_line.currency_id
if ml_currency and ml_currency != user_currency:
open_amount = move_line.amount_residual_currency
else:
open_amount = move_line.amount_residual