Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
This commit is contained in:
commit
b12349a768
@ -86,9 +86,8 @@ class SupportMailbox(POP3Mailbox):
|
||||
self.save_attachments(st.doc, mail.attachments)
|
||||
return
|
||||
|
||||
opts = webnotes.conn.sql("""\
|
||||
SELECT options FROM tabDocField
|
||||
WHERE parent='Support Ticket' AND fieldname='naming_series'""")
|
||||
from webnotes.model.doctype import get_property
|
||||
opts = get_property('Support Ticket', 'options', 'naming_series')
|
||||
# new ticket
|
||||
from webnotes.model.doc import Document
|
||||
d = Document('Support Ticket')
|
||||
@ -97,7 +96,7 @@ class SupportMailbox(POP3Mailbox):
|
||||
d.raised_by = mail.mail['From']
|
||||
d.content_type = content_type
|
||||
d.status = 'Open'
|
||||
d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
|
||||
d.naming_series = (opts and opts.split("\n")[0]) or 'SUP'
|
||||
try:
|
||||
d.save(1)
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user