feat(reports): packing slip for local deliveries (fusion.plating.delivery)
The packing slip report only existed for stock.picking (Delivery Orders), but this shop ships via fusion.plating.delivery and has no pickings — so packing slips never rendered for their flow, and the prior auto-generate + email-notification paths pointed the stock.picking report at a delivery (wrong model -> blank PDF). Add a delivery-native variant: report_fp_packing_slip_delivery_portrait + action_report_fp_packing_slip_delivery_portrait (bound to fusion.plating.delivery -> shows in the delivery Print menu), resolving the SO + lines from the delivery job_ref (same pattern as the BoL report) and reusing the shared styles / address / signoff bits + a sale.order.line items table. Repoint _fp_generate_packing_slip (dispatch auto-gen) and the notification attachment to the new report. Verified on entech: real content (customer, PO, items, PS#) for DLV-30102 — 142KB PDF vs prior blank 12.8KB. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -377,7 +377,7 @@ class FpNotificationTemplate(models.Model):
|
||||
# Packing slip — gated by customer preference (default True)
|
||||
if self.attach_packing_list and delivery and _customer_wants('x_fc_send_packing_slip'):
|
||||
att = _render_report(
|
||||
'fusion_plating_reports.action_report_fp_packing_slip_portrait', delivery,
|
||||
'fusion_plating_reports.action_report_fp_packing_slip_delivery_portrait', delivery,
|
||||
)
|
||||
if att:
|
||||
ids.append(att)
|
||||
|
||||
Reference in New Issue
Block a user