diff options
| -rw-r--r-- | fixco_custom/models/shipment_group.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
