purchase.order.form.inherit.subcontracting.inventory.move.firstpurchase.orderSubcontracting Inventory Movesir.actions.act_windowstock.movelist,form[('location_dest_id.name', '=', 'Subcontracting Location')]{'search_default_location_dest_id_name': 'Subcontracting Location'}Link to Purchase Ordercode
if records:
# Get the active purchase order from context
po_id = env.context.get('default_purchase_order_id') or env.context.get('active_id')
if po_id:
po = env['purchase.order'].browse(po_id)
for record in records:
po.link_selected_subcontracting_move(record.id)
# Close the wizard window
action = {'type': 'ir.actions.act_window_close'}