blob: 1ee3ab9efc394fca1610d887ea47c5734a97a97e [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301# ERPNext - web based ERP (http://erpnext.com)
2# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
Rushabh Mehta949496c2012-01-25 18:48:46 +053017import json, webnotes
18
Rushabh Mehtaaa848be2012-02-17 12:06:33 +053019@webnotes.whitelist(allow_guest=True)
Rushabh Mehta949496c2012-01-25 18:48:46 +053020def send(args):
21 """create support ticket"""
22 args = json.loads(args)
23
24 from webnotes.model.doc import Document
25 d = Document('Support Ticket')
26 d.raised_by = args['email']
27 d.description = 'From: ' + args['name'] + '\n\n' + args['message']
28 d.subject = 'Website Query'
29 d.status = 'Open'
30 d.owner = 'Guest'
31 d.save(1)
32 webnotes.msgprint("Thank you for your query. We will respond as soon as we can.")