From e513fad4e426c6d4bb57dcd7056637c937a112fd Mon Sep 17 00:00:00 2001 From: Mqdd Date: Fri, 2 Jan 2026 14:50:26 +0700 Subject: scan sgr can use invoice marketplace for gojek --- fixco_custom/models/shipment_group.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fixco_custom/models/shipment_group.py') diff --git a/fixco_custom/models/shipment_group.py b/fixco_custom/models/shipment_group.py index 68e5235..8281c53 100644 --- a/fixco_custom/models/shipment_group.py +++ b/fixco_custom/models/shipment_group.py @@ -243,8 +243,12 @@ class PickingLine(models.Model): ('tracking_number', '=', line.scan_receipt) ], limit=1) + invoice_marketplce = self.env['stock.picking'].search([ + ('invoice_mp', '=', line.scan_receipt) + ], limit=1) if not picking: - raise UserError("Receipt '%s' not found or hasn't been done." % line.scan_receipt) + if not invoice_marketplce: + raise UserError("Receipt '%s' not found or hasn't been done." % line.scan_receipt) # Isi field otomatis line.picking_id = picking -- cgit v1.2.3