Making a transaction
When you make a new transaction sending Bitcoins, you broadcast the transaction to the peers you're connected to, then they send it on to their peers, etc. There's no way for anyone to know for sure whether you created a transaction they get from you, or whether you're just relaying a transaction you received from someone else.
If I was able to connect to all the peers in the network then it's likely that the first one to send me a transaction is the one who created the transaction, but that's not certain, and it's also not possible to connect to all the peers.
Receiving a transaction
When someone sends Bitcoins to your address, your client isn't involved at all. You don't even need to have your computer turned on to receive Bitcoins at your address. So there's no way anyone can find your IP address when you receive Bitcoins.