mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Use meaningful dates when converting currencies
This commit is contained in:
@@ -494,7 +494,7 @@ class banking_import_transaction(osv.osv):
|
||||
if from_curr_id != to_curr_id:
|
||||
amount_currency = statement_line_pool._convert_currency(
|
||||
cr, uid, from_curr_id, to_curr_id, move_line_amount,
|
||||
round=True, date=time.strftime('%Y-%m-%d'),
|
||||
round=True, date=transaction.move_line_id.date,
|
||||
context=context)
|
||||
else:
|
||||
amount_currency = move_line_amount
|
||||
@@ -1560,7 +1560,7 @@ class banking_import_transaction(osv.osv):
|
||||
from_curr_id = transaction.move_line_id.currency_id and transaction.move_line_id.currency_id.id or transaction.statement_id.company_id.currency_id.id
|
||||
if from_curr_id != to_curr_id:
|
||||
amount_currency = stline_pool._convert_currency(cr, uid, from_curr_id, to_curr_id, move_line_amount, round=True,
|
||||
date=time.strftime('%Y-%m-%d'), context=context)
|
||||
date=transaction.statement_line_id.date, context=context)
|
||||
else:
|
||||
amount_currency = move_line_amount
|
||||
sign = 1
|
||||
|
||||
Reference in New Issue
Block a user