summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-08-06 13:52:21 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-08-06 13:52:21 +0700
commit7ebcf1675e55dae39f769466e5bf5ef064646f27 (patch)
treec7fccfb7e36678b9b5ee4145dee85b37dcbcd94d /indoteknik_custom/models/account_move.py
parent09032d721277221730efa3db7a2d8353524d509c (diff)
parentab11c9455c6e125195ec5004adfd855058d46f5f (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into reminder-tempo-v2
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 53e5a8e8..bf7e2d68 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -94,6 +94,23 @@ 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
+ )
+
+ if payment:
+ move.payment_date = payment[0].date
+ elif move.reklas_misc_id:
+ move.payment_date = move.reklas_misc_id.date
+ else:
+ move.payment_date = False
+
# def name_get(self):
# result = []
# for move in self: