Skip to content

Commit

Permalink
[FIX] account_reconcile_oca: Update currency_amount
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Jan 3, 2025
1 parent 9ec53e1 commit aae46b2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion account_reconcile_oca/models/account_bank_statement_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def _onchange_manual_amount_in_currency(self):
self._onchange_manual_reconcile_vals()

def _get_manual_reconcile_vals(self):
return {
vals = {
"name": self.manual_name,
"partner_id": self.manual_partner_id
and self.manual_partner_id.name_get()[0]
Expand All @@ -442,6 +442,18 @@ def _get_manual_reconcile_vals(self):
"debit": self.manual_amount if self.manual_amount > 0 else 0.0,
"analytic_distribution": self.analytic_distribution,
}
if self.manual_line_id:
vals.update(
{
"currency_amount": self.manual_line_id.currency_id._convert(
self.manual_amount,
self.manual_in_currency_id,
self.company_id,
self.manual_line_id.date,
),
}
)
return vals

@api.onchange(
"manual_account_id",
Expand Down

0 comments on commit aae46b2

Please sign in to comment.