Obi-Wan was unconscious when Anakin killed Dooku (Obi-Wan had been knocked out earlier in the fight), so he didn't see that Anakin executed Dooku. Obi-Wan praised Anakin for his victory over Dooku without realizing how Anakin had killed him.
The only witness to Dooku's execution was Palpatine, so none of the Jedi knew Anakin had executed Dooku. The Jedi thought Anakin had defeated Dooku in armed combat, which is acceptable to the Jedi.
Executing an unarmed man like Anakin did, however, is not the Jedi way, good, or moral. Palpatine (secretly a Sith Lord) encouraged Anakin to do it in order to draw Anakin closer to the dark side. When Anakin admitted that his execution of Dooku was not the "Jedi way", Palpatine replied:
It is only natural. He cut off your arm, and you wanted revenge. It wasn't the first time, Anakin. Remember what you told me about your mother and the Sand People.
This was another step in Anakin's journey to the dark side.