diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-08-06 09:25:09 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-08-06 09:25:09 +0700 |
| commit | 10d0e2bf639b31e58fd0d80a61062aa3ddc8f041 (patch) | |
| tree | fd92b9538c820e1419154a43f19bea1090d62465 /indoteknik_custom/models/account_move.py | |
| parent | fcd98b0f038cfa1653b8b12df77750253ebd7a68 (diff) | |
| parent | c42bdba2996d85d328897e42e7a1d86001b3a14d (diff) | |
<hafid> change delivered api
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 1a6fad1c..4be6c984 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -94,6 +94,21 @@ 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 + else: + move.payment_date = False + # def name_get(self): # result = [] # for move in self: |
