بسم الله الرحمن الرحيم
(Fatwa: 135/140/M=2/1439)
It is not allowed to keep dog as pet out of fashion and amusement and it is also not allowed to sell and buy it for this purpose. Similarly, it is not lawful to sell a dog which is mad or harmful according to Imam Abu Hanifah (may Allah have mercy upon him). Yes, the dog which is of use and is bought for lawful purpose such as for hunting, or to guard house, field, granary and animals then it is lawful to buy and sell the dog for these purposes.
Allah knows Best!
Darul Ifta,
Darul Uloom Deoband