From 6dda561fa704add3be34ecb16fa44e72fcf1bf56 Mon Sep 17 00:00:00 2001 From: HafidBuroiroh Date: Fri, 3 Oct 2025 09:44:09 +0700 Subject: push --- indoteknik_custom/models/refund_sale_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index de9870f6..a866af6e 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -571,7 +571,9 @@ class RefundSaleOrder(models.Model): domain = [ ('journal_id', '=', 11), ('state', '=', 'posted'), - ('ref', 'ilike', 'dp') + '|', + ('ref', 'ilike', 'dp'), + ('ref', 'ilike', 'payment'), ] domain += ['|'] * (len(so_names) - 1) for n in so_names: -- cgit v1.2.3 From d3fc7f9dfbd3df9687c9531813ac59c3318c6b43 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 6 Oct 2025 09:08:31 +0700 Subject: rollback --- indoteknik_custom/models/stock_picking.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index ae7121da..0b91e79d 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1080,14 +1080,9 @@ class StockPicking(models.Model): return res - def ask_approval(self): if self.env.user.is_accounting: raise UserError("Bisa langsung Validate") - if self.env.user.is_logistic_approver and self.location_id.id == 57 or self.location_id== 57: - raise UserError("Bisa langsung Validate") - - # for calendar distribute only # if self.is_internal_use: @@ -1110,9 +1105,6 @@ class StockPicking(models.Model): if line.qty_done <= 0: raise UserError("Qty tidak boleh 0") pick.approval_status = 'pengajuan1' - if pick.location_id.id == 57: - pick.approval_status = 'pengajuan2' - return def ask_receipt_approval(self): if self.env.user.is_logistic_approver: @@ -1315,9 +1307,6 @@ class StockPicking(models.Model): if self.picking_type_id.code == 'incoming' and self.group_id.id == False and self.is_internal_use == False: raise UserError(_('Tidak bisa Validate jika tidak dari Document SO / PO')) - if self.is_internal_use and not self.env.user.is_logistic_approver and self.location_id.id == 57: - raise UserError("Harus di Approve oleh Logistik") - if self.is_internal_use and not self.env.user.is_accounting: raise UserError("Harus di Approve oleh Accounting") @@ -1344,7 +1333,6 @@ class StockPicking(models.Model): current_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') self.date_reserved = current_time - # Validate Qty Demand Can't higher than Qty Product if self.location_dest_id.id == 58 and 'BU/INPUT/' in self.name: for move in self.move_ids_without_package: @@ -1360,22 +1348,19 @@ class StockPicking(models.Model): ) self.validation_minus_onhand_quantity() - loc = self.location_id - if loc.id == 57 and not self.env.user.is_logistic_approver and self.approval_status in ['pengajuan2']: - raise UserError ("Harus Ask Approval Logistik") self.responsible = self.env.user.id # self.send_koli_to_so() if self.picking_type_code == 'outgoing' and 'BU/OUT/' in self.name: self.check_koli() res = super(StockPicking, self).button_validate() - + # Penambahan link PO di Stock Journal untuk Picking BD for picking in self: if picking.name and 'BD/' in picking.name and picking.purchase_id: stock_journal = self.env['account.move'].search([ ('ref', 'ilike', picking.name + '%'), - ('journal_id', '=', 3) # Stock Journal ID - ], limit = 1) + ('journal_id', '=', 3) # Stock Journal ID + ], limit=1) if stock_journal: stock_journal.write({ 'purchase_order_id': picking.purchase_id.id -- cgit v1.2.3 From f2f4aa02c6dc2d329fad8d7532297c96a4c5770e Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Mon, 6 Oct 2025 12:50:42 +0700 Subject: (andri) fix access export --- indoteknik_custom/security/ir.model.access.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index ea6670eb..a1adc90a 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -198,7 +198,7 @@ access_tukar_guling_mapping_koli_all_users,tukar.guling.mapping.koli.all.users,m access_sync_promise_date_wizard,access.sync.promise.date.wizard,model_sync_promise_date_wizard,base.group_user,1,1,1,1 access_sync_promise_date_wizard_line,access.sync.promise.date.wizard.line,model_sync_promise_date_wizard_line,base.group_user,1,1,1,1 access_change_date_planned_wizard,access.change.date.planned.wizard,model_change_date_planned_wizard,,1,1,1,1 -access_unpaid_invoice_view,access.unpaid.invoice.view,model_unpaid_invoice_view,base.group_user,1,1,1,1 -access_surat_piutang_user,surat.piutang user,model_surat_piutang,base.group_user,1,1,1,1 -access_surat_piutang_line_user,surat.piutang.line user,model_surat_piutang_line,base.group_user,1,1,1,1 +access_unpaid_invoice_view,access.unpaid.invoice.view,model_unpaid_invoice_view,,1,1,1,1 +access_surat_piutang_user,surat.piutang user,model_surat_piutang,,1,1,1,1 +access_surat_piutang_line_user,surat.piutang.line user,model_surat_piutang_line,,1,1,1,1 access_sj_tele,access.sj.tele,model_sj_tele,base.group_system,1,1,1,1 -- cgit v1.2.3 From e6bd4a34387c344835f738ba346697931171c252 Mon Sep 17 00:00:00 2001 From: HafidBuroiroh Date: Mon, 6 Oct 2025 15:53:22 +0700 Subject: push --- indoteknik_custom/views/account_move_line.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/views/account_move_line.xml b/indoteknik_custom/views/account_move_line.xml index 017a9eda..3a20388e 100644 --- a/indoteknik_custom/views/account_move_line.xml +++ b/indoteknik_custom/views/account_move_line.xml @@ -6,9 +6,9 @@ account.move - + -- cgit v1.2.3 From 37685c6a3a5b21ee83da1081435525de135f4913 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 6 Oct 2025 17:04:59 +0700 Subject: set null approval status when from website --- indoteknik_api/controllers/api_v1/sale_order.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indoteknik_api/controllers/api_v1/sale_order.py b/indoteknik_api/controllers/api_v1/sale_order.py index 25268856..1c87400f 100644 --- a/indoteknik_api/controllers/api_v1/sale_order.py +++ b/indoteknik_api/controllers/api_v1/sale_order.py @@ -727,8 +727,9 @@ class SaleOrder(controller.Controller): _logger.info(f"Updated user_id from partner: {parameters['user_id']}") if params['value']['type'] == 'sale_order': - parameters['approval_status'] = 'pengajuan1' - _logger.info("Setting approval_status to 'pengajuan1'") + # parameters['approval_status'] = 'pengajuan1' + parameters['approval_status'] = False + _logger.info("Setting approval_status to 'false'") sale_order = request.env['sale.order'].with_context(from_website_checkout=True).create([parameters]) sale_order.onchange_partner_contact() -- cgit v1.2.3