[Fix] Do not ignore lines with company currency defined

If account.move.line records have currency_id defined and this currency_id is the same than company_id.currency_id, these records should generate credit.control.line.
This commit is contained in:
Akim Juillerat
2018-02-22 14:35:21 +01:00
parent 5f13ac44cb
commit d941ea1b15
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