dimagi/logistics — pull request #49 by mlavin (2012-11-20 15:15:04+00:00)
Title: FB45943 SMS Alerts

This is the initial work to enable SMS reporting for continuous error conditions as defined in http://manage.dimagi.com/default.asp?45943

> Django Web Users can subscribe to weekly SMS reports generated by ongoing/continuous error conditions. 'Continous' is defined as X continuous weeks. X should be configured via settings.py. These conditions include:
* non-reporting facilities
* facilities not submitting complete stock reports
* facilities with stockouts

This is built on rapidsms-alerts to generate the notifications. That means `alerts.utils.trigger_notifications` must be called periodically. This adds an `EventSchedule` record to `init_reminders` to handle that.

There is remaining work which will be in separate follow-up pull requests:

- Add field to the user profile to allow them to opt-out of these notifications
- Add field to the user profile to allow them to state which (single) product-type they are interested in