From bb48a99ab5b666b858c4bb9d410c698dada7d542 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 15 Dec 2025 20:57:35 +0700 Subject: fix ribbon stock picking --- indoteknik_custom/views/stock_picking.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index 1bb7174e..9aa0581c 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -365,10 +365,11 @@ bg_color="bg-danger" attrs="{ 'invisible': [ - '|','|', + '|','|', '|', ('tukar_guling_id', '=', False), ('is_rev_tg', '=', False), - ('picking_type_id', 'not in', [29, 30]) + ('picking_type_id', 'not in', [29, 30]), + ('is_so_fiktif', '=', True) ]}"/> -- cgit v1.2.3 From 52754dc7663c45a7609e5d4a57119ef26ecb5190 Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Wed, 17 Dec 2025 16:29:17 +0700 Subject: (andri) fix grand total reminder inv mail --- indoteknik_custom/models/account_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index e36b9920..b05ec7ff 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -330,7 +330,8 @@ class AccountMove(models.Model): grand_total = 0 for idx, inv in enumerate(invs, start=1): # numbering days_to_due = (inv.invoice_date_due - today).days if inv.invoice_date_due else 0 - grand_total += inv.amount_total + # grand_total += inv.amount_total + grand_total += inv.amount_residual invoice_table_rows += f""" {idx} -- cgit v1.2.3 From a8de47d71da75c9351da76ac87ba6046d5b152c3 Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Wed, 17 Dec 2025 16:51:17 +0700 Subject: (andri) penambahan field pada tree realisasi PUM --- indoteknik_custom/models/advance_payment_request.py | 2 +- indoteknik_custom/views/advance_payment_settlement.xml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index d379eac8..f973a9da 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -1072,7 +1072,7 @@ class AdvancePaymentSettlement(models.Model): ], string = "Banyaknya Attachment", default='one_for_one_line') move_id = fields.Many2one('account.move', string='Journal Entries', domain=[('move_type', '=', 'entry')]) - is_cab_visible = fields.Boolean(string='Is Journal Uang Muka Visible', compute='_compute_is_cab_visible') + is_cab_visible = fields.Boolean(string='Status Jurnal', compute='_compute_is_cab_visible') user_id = fields.Many2one( 'res.users', diff --git a/indoteknik_custom/views/advance_payment_settlement.xml b/indoteknik_custom/views/advance_payment_settlement.xml index a77baffe..c2b6a26f 100644 --- a/indoteknik_custom/views/advance_payment_settlement.xml +++ b/indoteknik_custom/views/advance_payment_settlement.xml @@ -163,10 +163,13 @@ - - + + + + + -- cgit v1.2.3 From 48e81bf679958286b15812ed5c8982b25e4e3843 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 18 Dec 2025 09:28:59 +0700 Subject: add customer name in commission internal line --- indoteknik_custom/models/commission_internal.py | 3 ++- indoteknik_custom/views/commission_internal.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/commission_internal.py b/indoteknik_custom/models/commission_internal.py index cd6da380..4de5c723 100644 --- a/indoteknik_custom/models/commission_internal.py +++ b/indoteknik_custom/models/commission_internal.py @@ -259,6 +259,7 @@ class CommissionInternal(models.Model): 'res_name': data['res_name'], 'res_id': data['res_id'], 'name': data['name'], + 'customer': data['customer'], 'salesperson': data['salesperson'], 'totalamt': data['amount_total'], 'uang_masuk_line_id': data['uang_masuk_line_id'], @@ -271,7 +272,6 @@ class CommissionInternal(models.Model): 'helper1': data['helper1'], 'helper2': data['helper2'] }]) - print(1) # this button / method works for train data in July 2025 def calculate_commission_internal_from_keyword(self): @@ -390,3 +390,4 @@ class CommissionInternalResult(models.Model): helper3 = fields.Char(string='Helper3') helper4 = fields.Char(string='Helper4') helper5 = fields.Char(string='Helper5') + customer = fields.Char(string='Customer') diff --git a/indoteknik_custom/views/commission_internal.xml b/indoteknik_custom/views/commission_internal.xml index 2f3db5b0..d84eb4b8 100644 --- a/indoteknik_custom/views/commission_internal.xml +++ b/indoteknik_custom/views/commission_internal.xml @@ -108,6 +108,7 @@ + -- cgit v1.2.3 From cd78a30609e0fa956458dabc02c4f199459cee9a Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 18 Dec 2025 10:33:07 +0700 Subject: add error if click result more than once --- indoteknik_custom/models/commission_internal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indoteknik_custom/models/commission_internal.py b/indoteknik_custom/models/commission_internal.py index 4de5c723..efe0f4fb 100644 --- a/indoteknik_custom/models/commission_internal.py +++ b/indoteknik_custom/models/commission_internal.py @@ -178,6 +178,9 @@ class CommissionInternal(models.Model): # fill later TODO @stephan def calculate_commission_internal_result(self): + if self.commission_internal_result: + raise UserError('Hapus semua isi table result jika ingin di create result ulang') + exception = ['ONGKOS KIRIM SO/20'] query = [ ('commission_internal_id.id', '=', self.id), -- cgit v1.2.3 From 1baaa11159d295684b54104160dbaa96215f9742 Mon Sep 17 00:00:00 2001 From: Mqdd Date: Thu, 18 Dec 2025 11:18:32 +0700 Subject: merge & add tracking button in commission internal --- indoteknik_custom/models/account_move.py | 3 ++- indoteknik_custom/models/advance_payment_request.py | 2 +- indoteknik_custom/models/commission_internal.py | 11 +++++++++-- indoteknik_custom/views/advance_payment_settlement.xml | 7 +++++-- indoteknik_custom/views/commission_internal.xml | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index e36b9920..b05ec7ff 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -330,7 +330,8 @@ class AccountMove(models.Model): grand_total = 0 for idx, inv in enumerate(invs, start=1): # numbering days_to_due = (inv.invoice_date_due - today).days if inv.invoice_date_due else 0 - grand_total += inv.amount_total + # grand_total += inv.amount_total + grand_total += inv.amount_residual invoice_table_rows += f""" {idx} diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index d379eac8..f973a9da 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -1072,7 +1072,7 @@ class AdvancePaymentSettlement(models.Model): ], string = "Banyaknya Attachment", default='one_for_one_line') move_id = fields.Many2one('account.move', string='Journal Entries', domain=[('move_type', '=', 'entry')]) - is_cab_visible = fields.Boolean(string='Is Journal Uang Muka Visible', compute='_compute_is_cab_visible') + is_cab_visible = fields.Boolean(string='Status Jurnal', compute='_compute_is_cab_visible') user_id = fields.Many2one( 'res.users', diff --git a/indoteknik_custom/models/commission_internal.py b/indoteknik_custom/models/commission_internal.py index cd6da380..ce9c564d 100644 --- a/indoteknik_custom/models/commission_internal.py +++ b/indoteknik_custom/models/commission_internal.py @@ -1,4 +1,4 @@ -from odoo import models, api, fields +from odoo import models, api, fields, _ from odoo.exceptions import AccessError, UserError, ValidationError from datetime import timedelta, date import logging @@ -178,6 +178,9 @@ class CommissionInternal(models.Model): # fill later TODO @stephan def calculate_commission_internal_result(self): + if self.commission_internal_result: + raise UserError('Hapus semua isi table result jika ingin di create result ulang') + exception = ['ONGKOS KIRIM SO/20'] query = [ ('commission_internal_id.id', '=', self.id), @@ -259,6 +262,7 @@ class CommissionInternal(models.Model): 'res_name': data['res_name'], 'res_id': data['res_id'], 'name': data['name'], + 'customer': data['customer'], 'salesperson': data['salesperson'], 'totalamt': data['amount_total'], 'uang_masuk_line_id': data['uang_masuk_line_id'], @@ -271,7 +275,7 @@ class CommissionInternal(models.Model): 'helper1': data['helper1'], 'helper2': data['helper2'] }]) - print(1) + self.message_post(body=("Commission Internal Result generated by %s at %s.") % (self.env.user.name, fields.Datetime.now())) # this button / method works for train data in July 2025 def calculate_commission_internal_from_keyword(self): @@ -286,6 +290,7 @@ class CommissionInternal(models.Model): self._calculate_keyword_undefined() # execute helper2 for parse the label into INV/ or SO/ and switch SO to INV if available self._parse_label_helper2() + self.message_post(body=("Commission Internal Line calculated by %s at %s.") % (self.env.user.name, fields.Datetime.now())) def generate_commission_from_generate_ledger(self): if self.commission_internal_line: @@ -321,6 +326,7 @@ class CommissionInternal(models.Model): 'balance': ledger.balance }]) count += 1 + self.message_post(body=("Commission Internal Line generated by %s at %s") % (self.env.user.name, fields.Datetime.now())) _logger.info("Commission Internal Line generated %s" % count) @@ -390,3 +396,4 @@ class CommissionInternalResult(models.Model): helper3 = fields.Char(string='Helper3') helper4 = fields.Char(string='Helper4') helper5 = fields.Char(string='Helper5') + customer = fields.Char(string='Customer') diff --git a/indoteknik_custom/views/advance_payment_settlement.xml b/indoteknik_custom/views/advance_payment_settlement.xml index a77baffe..c2b6a26f 100644 --- a/indoteknik_custom/views/advance_payment_settlement.xml +++ b/indoteknik_custom/views/advance_payment_settlement.xml @@ -163,10 +163,13 @@ - - + + + + + diff --git a/indoteknik_custom/views/commission_internal.xml b/indoteknik_custom/views/commission_internal.xml index 2f3db5b0..d84eb4b8 100644 --- a/indoteknik_custom/views/commission_internal.xml +++ b/indoteknik_custom/views/commission_internal.xml @@ -108,6 +108,7 @@ + -- cgit v1.2.3