Print Picking Operations
code
pickings = records.mapped('picking_ids').filtered(lambda p: p.state != 'cancel')
action = env.ref('stock.action_report_picking').report_action(pickings)
Print Delivery Slip
code
pickings = records.mapped('picking_ids').filtered(lambda p: p.state != 'cancel')
action = env.ref('stock.action_report_delivery').report_action(pickings)