[FIX] account_move_last_payment fix pre-commit
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m40s
tests / test (pull_request) Successful in 2m7s

This commit is contained in:
2026-11-03 15:02:38 +01:00
parent 54bb9f0788
commit 568f49c784
5 changed files with 9 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
# Account Move Last Payment
Expose on `account.move` the date of the most recent real payment reconciled
with an invoice, as a stored, exportable field shown in the invoice list view.
Expose on `account.move` the date of the most recent real payment reconciled with an
invoice, as a stored, exportable field shown in the invoice list view.
## Features

View File

@@ -15,7 +15,7 @@ class AccountMove(models.Model):
"invoice, whatever the reconciliation path (explicit payment "
"or direct bank statement line reconciliation).",
)
preferred_payment_method_line_id = fields.Many2one(string="Planned Payment Method")
@api.depends(
@@ -68,4 +68,4 @@ class AccountMove(models.Model):
dates.append(payment.date)
elif counterpart_line.move_id.statement_line_id:
dates.append(counterpart_line.move_id.date)
return dates
return dates

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -230,4 +230,4 @@ class TestAccountMoveLastPayment(AccountTestInvoicingCommon):
entry.action_post()
self.assertFalse(refund.last_payment_date)
self.assertFalse(entry.last_payment_date)
self.assertTrue(invoice.last_payment_date)
self.assertTrue(invoice.last_payment_date)

View File

@@ -10,4 +10,4 @@
</field>
</field>
</record>
</odoo>
</odoo>