Support Ticket Naming Series

This commit is contained in:
Anand Doshi 2012-01-05 17:39:42 +05:30
parent 97b1bf4b19
commit 9dd1e5d728
2 changed files with 24 additions and 10 deletions

View File

@ -1,4 +1,5 @@
import webnotes
from webnotes.model.doc import make_autoname
from utilities.transaction_base import TransactionBase
from home import update_feed
@ -8,6 +9,9 @@ class DocType(TransactionBase):
self.doc = doc
self.doclist = doclist
def autoname(self):
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
def send_response(self):
"""
Adds a new response to the ticket and sends an email to the sender

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2011-05-23 10:00:38',
'creation': '2011-05-23 12:37:01',
'docstatus': 0,
'modified': '2011-12-27 17:40:25',
'modified': '2012-01-05 16:29:45',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@ -15,8 +15,8 @@
'_last_update': '1311584009',
'allow_attach': 1,
'allow_trash': 1,
'autoname': 'SUP.######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'doctype': 'DocType',
'module': 'Support',
'name': '__common__',
@ -26,7 +26,7 @@
'show_in_menu': 0,
'subject': '%(subject)s',
'tag_fields': 'status,allocated_to',
'version': 149
'version': 153
},
# These values are common for all DocField
@ -41,6 +41,7 @@
# These values are common for all DocPerm
{
'amend': 0,
'cancel': 0,
'doctype': 'DocPerm',
'name': '__common__',
'parent': 'Support Ticket',
@ -58,7 +59,6 @@
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@ -68,7 +68,6 @@
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@ -78,7 +77,6 @@
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': 'DocPerm',
'permlevel': 0,
@ -88,7 +86,6 @@
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
'permlevel': 1,
@ -98,7 +95,6 @@
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': 'DocPerm',
'permlevel': 2,
@ -187,7 +183,6 @@
'doctype': 'DocField',
'fieldtype': 'Button',
'label': 'Send',
'options': 'send_response',
'permlevel': 0
},
@ -392,5 +387,20 @@
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'naming_series',
'fieldtype': 'Select',
'hidden': 1,
'label': 'Series',
'no_copy': 1,
'options': 'SUP',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0
}
]