As a buyer I leave feedback as soon as I recieve my item, if I'm happy with it. Or in case I'm not happy, I leave it after trying to resolve it with the seller.
As a seller I leave it after they let me know they are happy - either by telling me or by leaving pos feedback. I've had buyers cause very unwarranted trouble for me (or wrongly negging me without contacting me) upon recieving their items, so I no longer leave feedback straight after recieving payment.
In trades I would probably leave after both have recieved and are happy with their item. Any possible resolution to a problem should also be viewed as part of the transaction, imo.