diff --git a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py new file mode 100644 index 00000000000..1ae94a7dcd6 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py @@ -0,0 +1,11 @@ +import webnotes + +def execute(): + sql = webnotes.conn.sql + + sql("commit") + sql("set foreign_key_checks=0") + for tab in sql("show tables"): + sql("ALTER TABLE `%s` CONVERT TO CHARACTER SET utf8" % tab[0]) + + sql("set foreign_key_checks=1") diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py index e0af7ece248..58b7d912ec0 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.py +++ b/erpnext/selling/doctype/installation_note/installation_note.py @@ -98,7 +98,7 @@ class DocType(TransactionBase): #get list of serial no from previous_doc #---------------------------------------------- def get_prevdoc_serial_no(self, prevdoc_detail_docname, prevdoc_docname): - from material_management.doctype.stock_ledger.stock_ledger import get_sr_no_list + from stock.doctype.stock_ledger.stock_ledger import get_sr_no_list res = sql("select serial_no from `tabDelivery Note Detail` where name = '%s' and parent ='%s'" % (prevdoc_detail_docname, prevdoc_docname)) return get_sr_no_list(res[0][0]) diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py index 709c7638a59..2db784eb3d6 100644 --- a/erpnext/support/doctype/support_ticket/support_ticket.py +++ b/erpnext/support/doctype/support_ticket/support_ticket.py @@ -23,6 +23,9 @@ class DocType(TransactionBase): response = self.doc.new_response + '\n\n[Please do not change the subject while responding.]' + # add last response to new response + response += self.last_response() + signature = webnotes.conn.get_value('Email Settings',None,'support_signature') if signature: response += '\n\n' + signature @@ -39,6 +42,14 @@ class DocType(TransactionBase): webnotes.conn.set(self.doc,'status','Waiting for Customer') self.make_response_record(response) + def last_response(self): + """return last response""" + tmp = webnotes.conn.sql("""select mail from `tabSupport Ticket Response` + where parent = %s order by creation desc limit 1 + """, self.doc.name) + + return '\n\n=== In response to ===\n\n' + tmp[0][0] + def make_response_record(self, response, from_email = None, content_type='text/plain'): """ Creates a new Support Ticket Response record diff --git a/index.html b/index.html index 5e7bc59a138..ce1a617c21e 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@