[FIX] account_move_last_payment fix pre-commit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
3
account_move_last_payment/pyproject.toml
Normal file
3
account_move_last_payment/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
@@ -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)
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user