The rebels run into Captain Rex and his gang on a desert planet.
Star Wars: Rebels
Season 2 Episode 17: The Forgotten Droid
When Chopper's attempts to buy a new leg fails, he ends up stealing one and escaping on an Imperial ship where he makes friends with an inventory droid.