summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-06-11 03:33:29 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-06-11 03:33:29 +0000
commitb8fbe54d6a6eb6d0a56afb2a45235e1bd6adca90 (patch)
tree2adfd5dbe460bdd6a2d1265617a0cfb5a8108e49 /indoteknik_custom/models/account_move.py
parent05dafe1ab837cac8992d1dc6c012a26bce88c15c (diff)
parentd89f6b21f0174d52b1efb7d54ec3443bbbe3fbcb (diff)
Merged in cab-po-finance (pull request #326)
Cab po finance
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 30de67be..4cd2b6b3 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -67,6 +67,25 @@ class AccountMove(models.Model):
is_hr = fields.Boolean(string="Is HR?", default=False)
purchase_order_id = fields.Many2one('purchase.order', string='Purchase Order')
length_of_payment = fields.Integer(string="Length of Payment", compute='compute_length_of_payment')
+ reklas_misc_id = fields.Many2one('account.move', string='Journal Entries Reklas')
+ # Di model account.move
+ bill_id = fields.Many2one('account.move', string='Vendor Bill', domain=[('move_type', '=', 'in_invoice')], help='Bill asal dari proses reklas ini')
+
+
+ def name_get(self):
+ result = []
+ for move in self:
+ if move.move_type == 'entry':
+ # Jika masih draft, tampilkan 'Draft CAB'
+ if move.state == 'draft':
+ label = 'Draft CAB'
+ else:
+ label = move.name
+ result.append((move.id, label))
+ else:
+ # Untuk invoice dan lainnya, pakai default
+ result.append((move.id, move.display_name))
+ return result
def compute_length_of_payment(self):
for rec in self: