From c43cba9dd205a3f08343f79233d3af6f5ab189ff Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Thu, 5 Jun 2025 08:47:31 +0700 Subject: (andri) penyesuaian value field CAB ketika masi dalam keadaan draft --- indoteknik_custom/models/account_move.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 24cedc34..29368089 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -72,10 +72,14 @@ class AccountMove(models.Model): result = [] for move in self: if move.move_type == 'entry': - # Tampilkan nomor CAB (name) - result.append((move.id, move.name)) + # Jika masih draft, tampilkan 'Draft CAB' + if move.state == 'draft': + label = 'Draft CAB' + else: + label = move.name + result.append((move.id, label)) else: - # Gunakan default display + # Untuk invoice dan lainnya, pakai default result.append((move.id, move.display_name)) return result -- cgit v1.2.3