divio/django-shop — pull request #249 by jjimenezlopez (2013-08-29 20:30:23+00:00)
Title: Fixing signal calls

I think I have found an issue, or I think so.

If I modify from the admin view the amount of a OrderPayment, the order status is not changed and the "completed" signal is not sent. This is because the save_model method runs before the related objects are saved, therefore order.is_paid() is False. I have moved that code to the save_related method, this way it works.

I have also noticed that the "shipped" signal was not been sent, I have added the code to save_model, in case the state changes from another to "SHIPPED", the signal is called.

Please, tell me if I'm right, It's my first time with django-shop :)