mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[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:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user