Codeine isn't advised with breast feeding. Nothing to do with drug companies not funding investigations, but related to the genetics of the individual taking it.
Codeine is metabolised to morphine. The majority of people are normal metabolisers - so a small dose of codeine becomes a tiny dose of morphine. A few people can't metabolise it at all, so they get no pain relief from it. Another few metabolise it too well - so when they take codeine, most of it gets metabolised to morphine with all the side effects of opioid overdose (drowsiness, nausea, itching, low resp rate).
Because we don't know each individual genetic makeup, it's safer to say "don't take codeine if you're bf" than risk an ultra metaboliser taking it, metabolising it to a larger amount of morphine than expected and then having a higher concentration of morphine in breast milk than would be expected. There have been a few neonatal deaths from this. Obviously the risks are greatest in tiny newborns who are ebf and in whom the morphine dose is relatively much higher (mg/kg basis).
Tramadol has been tested and although it is excreted in breast milk, it's trace amounts. The M1 metabolite also appears in breast milk but in tiny doses. If you need a moderate opioid, I'd stick with that one.
OP, after a one off dose I wouldn't worry too much, it's repeated doses and accumulation that would concern me. But I'd still avoid taking it if possible.