Skip to content

Commit

Permalink
Merge PR #787 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jan 28, 2025
2 parents 5e4b346 + ca0b7a4 commit 37f1db6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions account_reconcile_oca/models/account_bank_statement_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,11 @@ 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:
liquidity_lines, _suspense_lines, _other_lines = self._seek_for_lines()
if self.manual_line_id and self.manual_line_id.id not in liquidity_lines.ids:
vals.update(
{
"currency_amount": self.manual_line_id.currency_id._convert(
"currency_amount": self.manual_currency_id._convert(
self.manual_amount,
self.manual_in_currency_id,
self.company_id,
Expand Down
3 changes: 3 additions & 0 deletions account_reconcile_oca/tests/test_bank_account_reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,10 @@ def test_invoice_foreign_currency_late_change_of_rate(self):
)
f.manual_reference = "account.move.line;%s" % line["id"]
# simulate click on statement line, check amount does not recompute
f.manual_partner_id = inv1.partner_id
self.assertEqual(f.manual_amount, 83.33)
# check currency amount is still fine
self.assertEqual(f.reconcile_data_info["data"][0]["currency_amount"], 100)
f.add_account_move_line_id = inv1.line_ids.filtered(
lambda l: l.account_id.account_type == "asset_receivable"
)
Expand Down

0 comments on commit 37f1db6

Please sign in to comment.