summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-06-05 08:47:31 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-06-05 08:47:31 +0700
commitc43cba9dd205a3f08343f79233d3af6f5ab189ff (patch)
treeaa3e8f6bf390a51bfe2e55acf3a7a957b26ebfb9
parentfa2c8cc7b00e963e740307484c174961f61ffc84 (diff)
(andri) penyesuaian value field CAB ketika masi dalam keadaan draft
-rw-r--r--indoteknik_custom/models/account_move.py10
1 files 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