summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-06-05 08:35:39 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-06-05 08:35:39 +0700
commitfa2c8cc7b00e963e740307484c174961f61ffc84 (patch)
tree52971fd5d0ae1d05df4c472055b93715992cbca8 /indoteknik_custom/models/account_move.py
parent3882ee6c3299525eeb8924cd9c7245f65cd15a28 (diff)
(andri) add field Journal Uang Muka di PO dan Purchase Order pada CAB
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 30de67be..24cedc34 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -68,6 +68,17 @@ class AccountMove(models.Model):
purchase_order_id = fields.Many2one('purchase.order', string='Purchase Order')
length_of_payment = fields.Integer(string="Length of Payment", compute='compute_length_of_payment')
+ def name_get(self):
+ result = []
+ for move in self:
+ if move.move_type == 'entry':
+ # Tampilkan nomor CAB (name)
+ result.append((move.id, move.name))
+ else:
+ # Gunakan default display
+ result.append((move.id, move.display_name))
+ return result
+
def compute_length_of_payment(self):
for rec in self:
payment_term = rec.invoice_payment_term_id.line_ids[0].days