From 3be1e1707547d40f618f70bd18e54519842e95a1 Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Thu, 19 Jun 2025 16:59:09 +0700 Subject: (andri) fix value PO pada CAB dan Vendor Bill pada MISC --- indoteknik_custom/models/invoice_reklas.py | 3 +++ indoteknik_custom/views/account_move.xml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/invoice_reklas.py b/indoteknik_custom/models/invoice_reklas.py index 5145e098..58299d3e 100644 --- a/indoteknik_custom/models/invoice_reklas.py +++ b/indoteknik_custom/models/invoice_reklas.py @@ -102,6 +102,9 @@ class InvoiceReklas(models.TransientModel): 'journal_id': 13 } + if invoice.purchase_order_id: + parameters_header['purchase_order_id'] = invoice.purchase_order_id.id + account_move = request.env['account.move'].create([parameters_header]) _logger.info('Success Reklas with %s' % account_move.name) diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index 0c2f9a68..d2b03b1d 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -37,8 +37,8 @@ - - + + -- cgit v1.2.3 From 498e5c757cdc08691956f2cad6ff5bd40755e7c1 Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Thu, 19 Jun 2025 17:22:29 +0700 Subject: (andri) fix value reference setelah reklas --- indoteknik_custom/models/invoice_reklas.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/invoice_reklas.py b/indoteknik_custom/models/invoice_reklas.py index 58299d3e..4ed7f0bf 100644 --- a/indoteknik_custom/models/invoice_reklas.py +++ b/indoteknik_custom/models/invoice_reklas.py @@ -87,10 +87,10 @@ class InvoiceReklas(models.TransientModel): po_name = invoice.purchase_order_id.name if invoice.purchase_order_id else '' # Susun nama referensi dengan aman - ref_name = 'REKLAS {} UANG MUKA {} {}{} {}'.format( + ref_name = 'REKLAS {} UANG MUKA {}{}{} {}'.format( self.reklas_id.name or '', 'PENJUALAN' if self.reklas_type == 'penjualan' else 'PEMBELIAN', - invoice.name or '', + f" {invoice.name}" if invoice.name != self.reklas_id.name else '', f" - {po_name}" if po_name else '', invoice.partner_id.name or '' ) @@ -109,7 +109,8 @@ class InvoiceReklas(models.TransientModel): _logger.info('Success Reklas with %s' % account_move.name) # ✅ Set Bill asal sebagai source document - account_move.bill_id = invoice.id + if invoice.move_type == 'in_invoice': + account_move.bill_id = invoice.id # Tambahkan info asal invoice ke jurnal (opsional) account_move.invoice_origin = invoice.name -- cgit v1.2.3 From 3097045aef8463edc41e417dfef4b0a6ae1d6bda Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Thu, 19 Jun 2025 17:31:44 +0700 Subject: (andri) comment duplicate field PO pada BILL --- indoteknik_custom/views/account_move.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index d2b03b1d..0fc62293 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -33,7 +33,7 @@ - + -- cgit v1.2.3