changes
This commit is contained in:
@@ -424,7 +424,10 @@ class FpCustomerPortal(CustomerPortal):
|
||||
'icon': '📑',
|
||||
})
|
||||
|
||||
# SHIPPING (idx 4) — packing list + tracking
|
||||
# SHIPPING (idx 4) — packing list + tracking. Two separate
|
||||
# docs so each can be pending/ready independently. Previously
|
||||
# combined into one entry; that broke when tracking_ref landed
|
||||
# before the packing slip (KeyError 'url').
|
||||
if job.packing_list_attachment_id:
|
||||
groups[4]['docs'].append({
|
||||
'label': 'Packing Slip',
|
||||
@@ -438,11 +441,26 @@ class FpCustomerPortal(CustomerPortal):
|
||||
})
|
||||
else:
|
||||
groups[4]['docs'].append({
|
||||
'label': 'Packing Slip · Tracking #',
|
||||
'sub': 'Available when shipped' + (' — ' + job.tracking_ref if job.tracking_ref else ''),
|
||||
'pending': not job.tracking_ref,
|
||||
'label': 'Packing Slip',
|
||||
'sub': 'Available once shipped',
|
||||
'pending': True,
|
||||
'icon': '📦',
|
||||
})
|
||||
if job.tracking_ref:
|
||||
groups[4]['docs'].append({
|
||||
'label': 'Tracking #%s' % job.tracking_ref,
|
||||
'sub': 'Click to track on the carrier site',
|
||||
'url': job.x_fc_tracking_url or '#',
|
||||
'icon_class': 'o_fp_doc_icon_shipping',
|
||||
'icon': '🚚',
|
||||
})
|
||||
else:
|
||||
groups[4]['docs'].append({
|
||||
'label': 'Tracking #',
|
||||
'sub': 'Available when shipped',
|
||||
'pending': True,
|
||||
'icon': '🚚',
|
||||
})
|
||||
|
||||
return groups
|
||||
|
||||
|
||||
Reference in New Issue
Block a user