Example #1
0
 def shipment_display(self, obj):
     for related_name in (
             'shipment_from',
             'shipment_to',
             'shipment_dest',
             'shipment_bill',
     ):
         try:
             shipment = getattr(obj, related_name)
             return object_detail_admin_link(shipment)
         except AttributeError:
             continue
     return None
Example #2
0
 def job_id(self, obj):
     return object_detail_admin_link(obj)
Example #3
0
 def route_link(self, obj):
     return object_detail_admin_link(obj.routeleg.route)
Example #4
0
 def shipment_link(self, obj):
     return object_detail_admin_link(obj.shipment)