Place chiles and onion wedge in a skillet over medium high heat and cook, turning occasionally until browned in spots and very aromatic, about 5 minutes. Add chicken stock and then pour into a small bowl. Cover and set aside to soften.
Wipe the skillet with a paper towel, add the oil and return to medium-high heat. Once hot, add oregano, cumin, achiote and garlic. Stir frequently and cook until aromatic but not browned, about 30 seconds or so. Add the chipotle chile and sauce and cook 30 seconds longer. Add vinegar, sugar and reserved pineapple juice. Remove from the heat.
Scrape the contents of the skillet into a blender, along with the chiles, onion and the soaking liquid. Blend on high until completely smooth, about 1 minute, scraping down sides as necessary. Set sauce aside to cool slightly.
Remove the ham from its packaging and place on a large roasting pan, flat side down. Pour the marinade over the top, making sure to work it in between the layers of ham. Place the pineapple slices all along the sides and top of the ham, securing with toothpicks. Cover with foil and chill for at least 4 hours and up to 36.
When ready to cook, preheat oven to 325°F. Place the ham in the oven, covered, and bake for 1 1/2 hours. Remove and discard the foil. Return to the oven and cook for 15 minutes. Baste with the sauce and return for another 15 minutes. Baste once more and cook for another 15 minutes. Once charred and the internal temperature registers 140°F. Remove from the oven and allow to rest 15 minutes before serving. Serve warm or room temperature as is or in tacos with desired optional toppings. Enjoy!