[FIX] account_financial_report: Replace wrong field `amount_currency` with two fields `debit_amount_currency` and `credit_amount_currency`
parent
c754461b0c
commit
7ea63feb0c
|
@ -70,7 +70,13 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
|
||||
def _get_account_partial_reconciled(self, company_id, date_at_object):
|
||||
domain = [("max_date", ">", date_at_object), ("company_id", "=", company_id)]
|
||||
fields = ["debit_move_id", "credit_move_id", "amount", "amount_currency"]
|
||||
fields = [
|
||||
"debit_move_id",
|
||||
"credit_move_id",
|
||||
"amount",
|
||||
"debit_amount_currency",
|
||||
"credit_amount_currency",
|
||||
]
|
||||
accounts_partial_reconcile = self.env["account.partial.reconcile"].search_read(
|
||||
domain=domain, fields=fields
|
||||
)
|
||||
|
@ -85,7 +91,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
debit_amount[debit_move_id] = 0.0
|
||||
debit_amount_currency[debit_move_id] = 0.0
|
||||
debit_amount_currency[debit_move_id] += account_partial_reconcile_data[
|
||||
"amount_currency"
|
||||
"debit_amount_currency"
|
||||
]
|
||||
debit_amount[debit_move_id] += account_partial_reconcile_data["amount"]
|
||||
if credit_move_id not in credit_amount.keys():
|
||||
|
@ -93,7 +99,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
credit_amount_currency[credit_move_id] = 0.0
|
||||
credit_amount[credit_move_id] += account_partial_reconcile_data["amount"]
|
||||
credit_amount_currency[credit_move_id] += account_partial_reconcile_data[
|
||||
"amount_currency"
|
||||
"credit_amount_currency"
|
||||
]
|
||||
account_partial_reconcile_data.update(
|
||||
{"debit_move_id": debit_move_id, "credit_move_id": credit_move_id}
|
||||
|
|
Loading…
Reference in New Issue