- ''' % (fb_sender[0][0], args['feedback'])
-
- sendmail('info@webnotestech.com', fb_sender[0][1], msg = fb_msg, subject=args['subject'],parts=[], cc=[], attach=[])
-
def get_dt_help(self,dt):
return sql("select description from tabDocType where name=%s",dt)[0][0] or ''
diff --git a/erpnext/patches/july_2012/project_patch_repeat.py b/erpnext/patches/july_2012/project_patch_repeat.py
new file mode 100644
index 00000000000..4bb549c3f1b
--- /dev/null
+++ b/erpnext/patches/july_2012/project_patch_repeat.py
@@ -0,0 +1,18 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("""update `tabPurchase Order Item` t1, `tabPurchase Order` t2
+ set t1.project_name = t2.project_name where t1.parent = t2.name
+ and ifnull(t1.project_name, '') = ''""")
+ webnotes.conn.sql("""update `tabPurchase Invoice Item` t1, `tabPurchase Invoice` t2
+ set t1.project_name = t2.project_name where t1.parent = t2.name
+ and ifnull(t1.project_name, '') = ''""")
+ webnotes.conn.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
+ set t1.project_name = t2.project_name where t1.parent = t2.name
+ and ifnull(t1.project_name, '') = ''""")
+
+ webnotes.conn.commit()
+ from webnotes.model.sync import sync
+ sync("buying", "purchase_order")
+ sync("buying", "purchase_request")
+ sync("accounts", "purchase_invoice")
+ webnotes.conn.begin()
\ No newline at end of file
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index b84c956b360..e74206ab94a 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -505,4 +505,8 @@ patch_list = [
'patch_module': 'patches.july_2012',
'patch_file': 'bin_permission',
},
+ {
+ 'patch_module': 'patches.july_2012',
+ 'patch_file': 'project_patch_repeat',
+ },
]
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project_control/project_control.py b/erpnext/projects/doctype/project_control/project_control.py
index 0dcd1a94f27..9928ffd35a8 100644
--- a/erpnext/projects/doctype/project_control/project_control.py
+++ b/erpnext/projects/doctype/project_control/project_control.py
@@ -155,7 +155,6 @@ def sent_reminder_task():
If you have already completed this task, please update the system
Good Luck!
(This notification is autogenerated)
""" % i
- sendmail(i['allocated_to'], sender='automail@webnotestech.com', msg=msg2,send_now=1, \
- subject='A task has been assigned')
+ sendmail(i['allocated_to'], msg=msg2, subject='A task has been assigned')
sql("update `tabTask` set sent_reminder='1' where name='%(name)s' and allocated_to= '%(allocated_to)s'" % i)
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index 552a4c86be3..bfd98db1270 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -115,10 +115,7 @@ class DocType:
Expected End Date: %(exp_end_date)s
Details: %(description)s
(This notification is autogenerated)
""" % i
- sendmail(self.doc.allocated_to, sender='automail@webnotestech.com', msg=msg2,send_now=1,\
- subject= task_label + self.doc.subject)
-
-
+ sendmail(self.doc.allocated_to, msg=msg2,subject= task_label + self.doc.subject)
#validate before closing task
def validate_for_closed(self):
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 57f2bee1853..504b0bdc7af 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -110,16 +110,6 @@ cur_frm.cscript['Create Customer'] = function(){
);
}
-// send email
-// ===============================================================
-cur_frm.cscript.send_email = function(doc,cdt,cdn){
- if(doc.__islocal != 1){
- $c_obj(make_doclist(doc.doctype, doc.name),'send_mail','',function(r,rt){});
- }else{
- msgprint("Please save lead first before sending email")
- }
-}
-
// Create New Opportunity
// ===============================================================
cur_frm.cscript['Create Opportunity'] = function(){
diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py
index 166e4fa7065..cdb278ec58e 100644
--- a/erpnext/selling/doctype/lead/lead.py
+++ b/erpnext/selling/doctype/lead/lead.py
@@ -82,15 +82,9 @@ class DocType:
def on_update(self):
- # Add to calendar
- # ========================================================================
if self.doc.contact_by:
self.add_calendar_event()
- if session['user'] == 'Guest':
- if self.doc.email_id:
- self.send_email_notification()
-
if not self.doc.naming_series:
if session['user'] == 'Guest':
import webnotes.model.doctype
@@ -102,37 +96,6 @@ class DocType:
else:
msgprint("Please specify naming series")
raise Exception
-
- def send_email_notification(self):
- if not validate_email_add(self.doc.email_id.strip(' ')):
- msgprint('error:%s is not a valid email id' % self.doc.email_id.strip(' '))
- raise Exception
- else:
- subject = 'Thank you for interest in erpnext'
-
- sendmail([self.doc.email_id.strip(' ')], sender = sender_email[0][0], subject = subject , parts = [['text/html', self.get_notification_msg()]])
- msgprint("Mail Sent")
-
- def get_notification_msg(self):
- t = """
-
-
- Dear %s,
-
- Thank you for contacting us.
-
- You have left following message for us,
- %s
-
-
- You will receive reply on this shortly.
-
- Cheers!
-
-
- """ % (self.doc.lead_name, self.doc.remark)
-
- return t
# Add to Calendar
# ===========================================================================
@@ -157,25 +120,6 @@ class DocType:
ev.ref_name = self.doc.name
ev.save(1)
-
-#-----------------Email--------------------------------------------
- def send_emails(self, email=[], subject='', message=''):
- if email:
- sendmail(email, sender = webnotes.user.name, subject = subject , parts = [['text/html', message]])
- msgprint("Mail Sent")
- self.add_in_follow_up(message,'Email')
-
-#-------------------------Checking Sent Mails Details----------------------------------------------
- def send_mail(self):
- if not self.doc.subject or not self.doc.message:
- msgprint("Please enter subject & message in their respective fields.")
- elif not self.doc.email_id:
- msgprint("Recipient not specified. Please add email id of lead in 'Email id' field provided in 'Contact Info' section.")
- raise Exception
- else :
- self.send_emails([self.doc.email_id.strip(' ')], subject = self.doc.subject ,message = self.doc.message)
-
-#---------------------- Add details in follow up table----------------
def add_in_follow_up(self,message,type):
import datetime
child = addchild( self.doc, 'follow_up', 'Communication Log', 1, self.doclist)
diff --git a/erpnext/selling/doctype/lead/lead.txt b/erpnext/selling/doctype/lead/lead.txt
index b6aa8397d7d..a467f3af18c 100644
--- a/erpnext/selling/doctype/lead/lead.txt
+++ b/erpnext/selling/doctype/lead/lead.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-05-15 12:14:52',
+ 'creation': '2012-06-05 20:03:20',
'docstatus': 0,
- 'modified': '2012-05-30 12:43:03',
+ 'modified': '2012-08-02 18:01:53',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -505,23 +505,6 @@
'permlevel': 0
},
- # DocField
- {
- 'colour': u'White:FFF',
- 'description': u'Probability of lead converting to customer',
- 'doctype': u'DocField',
- 'fieldname': u'rating',
- 'fieldtype': u'Select',
- 'in_filter': 1,
- 'label': u'Rating',
- 'oldfieldname': u'rating',
- 'oldfieldtype': u'Select',
- 'options': u'\nHot\nWarm\nCold',
- 'permlevel': 0,
- 'reqd': 0,
- 'search_index': 0
- },
-
# DocField
{
'default': u'__user',
@@ -694,5 +677,14 @@
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'unsubscribed',
+ 'fieldtype': u'Check',
+ 'label': u'Unsubscribed',
+ 'permlevel': 0
}
]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/lead/lead_list.js b/erpnext/selling/doctype/lead/lead_list.js
index ca18dc6941b..b876d52cbb6 100644
--- a/erpnext/selling/doctype/lead/lead_list.js
+++ b/erpnext/selling/doctype/lead/lead_list.js
@@ -4,8 +4,7 @@ wn.doclistviews['Lead'] = wn.views.ListView.extend({
this.fields = this.fields.concat([
'tabLead.lead_name',
'tabLead.status',
- 'tabLead.source',
- 'tabLead.rating'
+ 'tabLead.source'
]);
this.stats = this.stats.concat(['status', 'source', 'rating', 'company']);
},
diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py
index 1bcde250599..20dcef386a8 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.py
+++ b/erpnext/selling/doctype/opportunity/opportunity.py
@@ -197,118 +197,7 @@ class DocType(TransactionBase):
set(self.doc, 'status', 'Opportunity Lost')
set(self.doc, 'order_lost_reason', arg)
return 'true'
-
-
- # On Send Email
- # ====================================================================================================================
- #def send_emails(self,email,sender,subject,message):
- # if email:
- # sendmail(email,sender,subject=subject or 'Opportunity',parts=[['text/plain',message or self.get_enq_summary()]])
-
- # Prepare HTML Table and Enter Opportunity Items in it, which will be added in enq summary
- # ====================================================================================================================
- def quote_table(self):
- if getlist(self.doclist,'enq_details'):
- header_lbl = ['Item Code','Item Name','Description','Reqd Qty','UOM']
- item_tbl = '''
'''
- return item_tbl
-
- # Prepare HTML Page containing summary of Opportunity, which will be sent as message in E-mail
- # ====================================================================================================================
- def get_enq_summary(self):
-
- t = """
-
-
-
-
-
- """ % (self.quote_table())
- return t
-
- #-----------------Email--------------------------------------------
- # ====================================================================================================================
- def send_emails(self, email=[], subject='', message=''):
- if email:
- sender_email= sql("Select email from `tabProfile` where name='%s'"%session['user'])
- if sender_email and sender_email[0][0]:
- attach_list=[]
- for at in getlist(self.doclist,'enquiry_attachment_detail'):
- if at.select_file:
- attach_list.append(at.select_file)
- cc_list=[]
- if self.doc.cc_to:
- for cl in (self.doc.cc_to.split(',')):
- if not validate_email_add(cl.strip(' ')):
- msgprint('error:%s is not a valid email id' % cl.strip(' '))
- raise Exception
- cc_list.append(cl.strip(' '))
- sendmail(cc_list, sender=sender_email[0][0], subject=subject, parts=[['text/html', message]], attach=attach_list)
- sendmail(email, sender=sender_email[0][0], subject=subject, parts=[['text/html', message]], cc=cc_list, attach=attach_list)
- #sendmail(cc_list, sender = sender_email[0][0], subject = subject , parts = [['text/html', message]],attach=attach_list)
- msgprint("Mail has been sent")
- self.add_in_follow_up(message,'Email')
- else:
- msgprint("Please enter your mail id in Profile")
- raise Exception
-
- #-------------------------Checking Sent Mails Details----------------------------------------------
- # ====================================================================================================================
- def sent_mail(self):
- if not self.doc.subject or not self.doc.message:
- msgprint("Please enter subject & message in their respective fields.")
- elif not self.doc.email_id1:
- msgprint("Recipient not specified. Please add email id in 'Send To'.")
- raise Exception
- else :
- if not validate_email_add(self.doc.email_id1.strip(' ')):
- msgprint('error:%s is not a valid email id' % self.doc.email_id1)
- else:
- self.send_emails([self.doc.email_id1.strip(' ')], subject = self.doc.subject ,message = self.doc.message)
-
+
#---------------------- Add details in follow up table----------------
# ====================================================================================================================
def add_in_follow_up(self,message,type):
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index 1e382d198da..ac0f37844aa 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -415,7 +415,6 @@ class DocType:
from webnotes.utils.email_lib import sendmail
try:
- #webnotes.msgprint('in send')
sendmail(
recipients=recipient_list,
sender='notifications+email_digest@erpnext.com',
diff --git a/erpnext/setup/doctype/email_settings/email_settings.py b/erpnext/setup/doctype/email_settings/email_settings.py
index 118dba2e1c3..cb2865706c9 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.py
+++ b/erpnext/setup/doctype/email_settings/email_settings.py
@@ -24,44 +24,24 @@ class DocType:
self.doc,self.doclist = doc,doclist
def validate(self):
- """
- Checks connectivity to email servers before saving
- """
+ """Checks connectivity to email servers before saving"""
self.validate_outgoing()
self.validate_incoming()
-
def validate_outgoing(self):
- """
- Checks incoming email settings
- """
+ """Checks incoming email settings"""
if self.doc.outgoing_mail_server:
from webnotes.utils import cint
- import _socket
- from webnotes.utils.email_lib.send import EMail
- import smtplib
- out_email = EMail()
- out_email.server = self.doc.outgoing_mail_server.encode('utf-8')
- out_email.port = cint(self.doc.mail_port)
- out_email.use_ssl = self.doc.use_ssl
- try:
- err_msg = "Login Id or Mail Password missing. Please enter and try again."
- if not (self.doc.mail_login and self.doc.mail_password):
- raise AttributeError, err_msg
- out_email.login = self.doc.mail_login.encode('utf-8')
- out_email.password = self.doc.mail_password.encode('utf-8')
- except AttributeError, e:
- webnotes.msgprint(err_msg)
- raise e
+ from webnotes.utils.email_lib.smtp import SMTPServer
+ smtpserver = SMTPServer(login = self.doc.mail_login,
+ password = self.doc.mail_password,
+ server = self.doc.outgoing_mail_server,
+ port = cint(self.doc.mail_port),
+ use_ssl = self.doc.use_ssl
+ )
- # exceptions are handled in smtp_connect
- sess = out_email.smtp_connect()
-
- try:
- sess.quit()
- except:
- pass
-
+ # exceptions are handled in session connect
+ sess = smtpserver.sess
def validate_incoming(self):
"""
diff --git a/erpnext/startup/schedule_handlers.py b/erpnext/startup/schedule_handlers.py
index a828feafafb..021cb1f6009 100644
--- a/erpnext/startup/schedule_handlers.py
+++ b/erpnext/startup/schedule_handlers.py
@@ -24,27 +24,26 @@ def execute_all():
* get support email
* recurring invoice
"""
- try:
- from support.doctype.support_ticket import get_support_mails
- get_support_mails()
- except Exception, e:
- scheduler.log('get_support_mails')
-
- try:
- from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
- manage_recurring_invoices()
- except Exception, e:
- scheduler.log('manage_recurring_invoices')
+ # pull emails
+ from support.doctype.support_ticket import get_support_mails
+ run_fn(get_support_mails)
+ # run recurring invoices
+ from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
+ run_fn(manage_recurring_invoices)
+ # bulk email
+ from webnotes.utils.email_lib.bulk import flush
+ run_fn(flush)
def execute_daily():
- """email digest"""
- try:
- from setup.doctype.email_digest.email_digest import send
- send()
- except Exception, e:
- scheduler.log('email_digest.send')
+ # email digest
+ from setup.doctype.email_digest.email_digest import send
+ run_fn(send)
+
+ # send bulk emails
+ from webnotes.utils.email_lib.bulk import cleanup
+ run_fn(clear_outbox)
def execute_weekly():
pass
@@ -54,3 +53,9 @@ def execute_monthly():
def execute_hourly():
pass
+
+def run_fn(fn):
+ try:
+ fn()
+ except Exception, e:
+ scheduler.log(fn.func_name)
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 9864fc909f0..9e00dc12bfe 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -181,27 +181,6 @@ class DocType:
self.doc.is_asset_item = 'No'
raise Exception
- def check_min_inventory_level(self):
- if self.doc.minimum_inventory_level:
- total_qty = sql("select sum(projected_qty) from tabBin where item_code = %s",self.doc.name)
- if flt(total_qty) < flt(self.doc.minimum_inventory_level):
- msgprint("Your minimum inventory level is reached")
- send_to = []
- send = sql("select t1.email from `tabProfile` t1,`tabUserRole` t2 where t2.role IN ('Material Master Manager','Purchase Manager') and t2.parent = t1.name")
- for d in send:
- send_to.append(d[0])
- msg = '''
-Minimum Inventory Level Reached
-
-Item Code: %s
-Item Name: %s
-Minimum Inventory Level: %s
-Total Available Qty: %s
-
-''' % (self.doc.item_code, self.doc.item_name, self.doc.minimum_inventory_level, total_qty)
-
- sendmail(send_to, sender='automail@webnotestech.com', subject='Minimum Inventory Level Reached', parts=[['text/plain', msg]])
-
def get_file_details(self, arg = ''):
file = sql("select file_group, description from tabFile where name = %s", eval(arg)['file_name'], as_dict = 1)
diff --git a/erpnext/utilities/doctype/contact/contact.txt b/erpnext/utilities/doctype/contact/contact.txt
index 135699b7689..baa2a775eed 100644
--- a/erpnext/utilities/doctype/contact/contact.txt
+++ b/erpnext/utilities/doctype/contact/contact.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-07-02 19:57:48',
+ 'creation': '2012-07-03 14:22:38',
'docstatus': 0,
- 'modified': '2012-07-03 12:54:52',
+ 'modified': '2012-08-02 13:16:48',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -38,133 +38,12 @@
'parenttype': u'DocType'
},
- # These values are common for all DocPerm
- {
- 'doctype': u'DocPerm',
- 'name': '__common__',
- 'parent': u'Contact',
- 'parentfield': u'permissions',
- 'parenttype': u'DocType',
- 'read': 1
- },
-
# DocType, Contact
{
'doctype': 'DocType',
'name': u'Contact'
},
- # DocPerm
- {
- 'cancel': 1,
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'System Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'amend': 0,
- 'cancel': 1,
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Sales Master Manager',
- 'submit': 0,
- 'write': 1
- },
-
- # DocPerm
- {
- 'cancel': 1,
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Purchase Master Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Sales Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Purchase Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Maintenance Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Accounts Manager',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Sales User',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Purchase User',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Maintenance User',
- 'write': 1
- },
-
- # DocPerm
- {
- 'create': 1,
- 'doctype': u'DocPerm',
- 'permlevel': 0,
- 'role': u'Accounts User',
- 'write': 1
- },
-
- # DocPerm
- {
- 'doctype': u'DocPerm',
- 'permlevel': 1,
- 'role': u'All'
- },
-
# DocField
{
'colour': u'White:FFF',
@@ -356,6 +235,15 @@
'permlevel': 0
},
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'unsubscribed',
+ 'fieldtype': u'Check',
+ 'label': u'Unsubscribed',
+ 'permlevel': 0
+ },
+
# DocField
{
'doctype': u'DocField',
diff --git a/erpnext/website/blog.py b/erpnext/website/blog.py
index 1f01b291710..5692f51f438 100644
--- a/erpnext/website/blog.py
+++ b/erpnext/website/blog.py
@@ -55,7 +55,7 @@ def get_recent_blog_list(args=None):
if not args: args = webnotes.form_dict
query = """\
- select name, title, left(content, 100) as content
+ select name, page_name, title, left(content, 100) as content
from tabBlog
where ifnull(published,0)=1 and
name!=%(name)s order by creation desc"""
diff --git a/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt b/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt
deleted file mode 100644
index 1fa8223cd04..00000000000
--- a/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# DocType, Blog Subscriber
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-27 14:36:47',
- 'docstatus': 0,
- 'modified': '2012-03-27 14:36:47',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all DocType
- {
- 'colour': u'White:FFF',
- 'doctype': 'DocType',
- 'module': u'Website',
- 'name': '__common__',
- 'section_style': u'Simple',
- 'show_in_menu': 0,
- 'version': 1
- },
-
- # DocType, Blog Subscriber
- {
- 'doctype': 'DocType',
- 'name': u'Blog Subscriber'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.html b/erpnext/website/page/unsubscribe/unsubscribe.html
deleted file mode 100644
index 7b2b68ee9c6..00000000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
Unsubscribe
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.js b/erpnext/website/page/unsubscribe/unsubscribe.js
deleted file mode 100644
index 9e83020a98c..00000000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pscript.onload_unsubscribe = function(wrapper) {
- var email = window.location.hash.split('/').splice(-1);
- $(wrapper).find('input[name="unsubscribe"]').val(email)
-
- $('#btn-unsubscribe').click(function() {
- var email = $(wrapper).find('input[name="unsubscribe"]').val();
- if(email) {
- var btn = this;
- wn.call({
- module:'website',
- page:'unsubscribe',
- method:'unsubscribe',
- args:email,
- btn: this,
- callback: function() {
- $(wrapper).find('input[name="unsubscribe"]').val('');
- }
- });
- }
- });
-}
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.py b/erpnext/website/page/unsubscribe/unsubscribe.py
deleted file mode 100644
index 9985ded4a8b..00000000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-import webnotes
-
-@webnotes.whitelist()
-def unsubscribe(arg):
- """unsubscribe from lists"""
- lists = [['Blog Subscriber', 'name']]
- for l in lists:
- webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
-
- webnotes.msgprint('Unsubscribed!')
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.txt b/erpnext/website/page/unsubscribe/unsubscribe.txt
deleted file mode 100644
index 2cc3b58a351..00000000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Page, unsubscribe
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-27 17:19:02',
- 'docstatus': 0,
- 'modified': '2012-01-27 17:19:02',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Page
- {
- 'doctype': 'Page',
- 'module': 'Website',
- 'name': '__common__',
- 'page_name': 'unsubscribe',
- 'standard': 'Yes',
- 'title': 'Unsubscribe'
- },
-
- # These values are common for all Page Role
- {
- 'doctype': 'Page Role',
- 'name': '__common__',
- 'parent': 'unsubscribe',
- 'parentfield': 'roles',
- 'parenttype': 'Page',
- 'role': 'Guest'
- },
-
- # Page, unsubscribe
- {
- 'doctype': 'Page',
- 'name': 'unsubscribe'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/templates/js/blog_page.js b/erpnext/website/templates/js/blog_page.js
index 71216778555..56dcf21b9dd 100644
--- a/erpnext/website/templates/js/blog_page.js
+++ b/erpnext/website/templates/js/blog_page.js
@@ -59,7 +59,7 @@ erpnext.blog.render_recent_list = function(wrapper) {
hide_refresh: true,
render_row: function(parent, data) {
if(data.content && data.content.length>=100) data.content += '...';
- parent.innerHTML = repl('%(title)s\
+ parent.innerHTML = repl('%(title)s\