diff options
| author | mga@tinyerp.com <> | 2008-09-10 12:46:19 +0530 |
|---|---|---|
| committer | mga@tinyerp.com <> | 2008-09-10 12:46:19 +0530 |
| commit | ff3f4804da0f4e08551d15b34a718cd480cbc285 (patch) | |
| tree | c821e646fafc324558af78cb884375f35f44fa69 /bin | |
| parent | 76a8e3ea58ab1a8ee18fb251e760162fe5a6ccb3 (diff) | |
seprate fields for message of email, and sms
bzr revid: mga@tinyerp.com-20080910071619-0o2d3jyb9w9bw4ro
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/addons/base/ir/ir_actions.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index fad22ec5ee1..86cbc80bdb2 100755 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -378,6 +378,7 @@ class actions_server(osv.osv): 'trigger_obj_id': fields.reference('Trigger On', selection=model_get, size=128), 'message': fields.text('Message', translate=True), 'address': fields.many2one('ir.model.fields', 'Email From / SMS'), + 'sms': fields.text('SMS', size=160, translate=True), 'child_ids': fields.one2many('ir.actions.actions', 'parent_id', 'Others Actions'), 'usage': fields.char('Action Usage', size=32), 'type': fields.char('Report Type', size=32, required=True), @@ -493,7 +494,12 @@ class actions_server(osv.osv): wf_service.trg_validate(uid, model, int(id), action.trigger_name, cr) if action.state == 'sms': - #TODO: Apply mearge with the field + #TODO: set the user and password from the system + # for the sms gateway user / password + api_id = '' + text = action.sms + to = self.get_field_value(cr, uid, str(action.message), action, context) + #TODO: Apply message mearge with the field if tools.sms_send(user, password, api_id, text, to) == True: logger.notifyChannel('sms', netsvc.LOG_INFO, 'SMS successfully send to : %s' % (action.address)) else: |
