summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-08-05 11:24:34 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-08-05 11:24:34 +0700
commiteb91fb8b9cf3ebc68f6c609acbc85015ce902cab (patch)
treee5e3fcaee4dadc01e473b396005f11dd371a59a6 /indoteknik_custom/models
parent519c18161bf658853908ddf7216aab504ac4c743 (diff)
add payment date on invoices
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/account_move.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 1a6fad1c..929af949 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -94,6 +94,18 @@ class AccountMove(models.Model):
compute='_compute_has_refund_so',
)
+ payment_date = fields.Date(string="Payment Date", compute='_compute_payment_date')
+
+ def _compute_payment_date(self):
+ for move in self:
+ accountPayment = self.env['account.payment']
+
+ payment = accountPayment.search([]).filtered(
+ lambda p: move.id in p.reconciled_invoice_ids.ids
+ )
+
+ move.payment_date = payment[0].date
+
# def name_get(self):
# result = []
# for move in self: