Merge branch 'latest' of github.com:webnotes/erpnext into latest

This commit is contained in:
Anand Doshi
2012-02-13 17:57:45 +05:30
21 changed files with 43 additions and 162 deletions

View File

@@ -10,8 +10,11 @@ class DocType:
self.doc.name = website.utils.page_name(self.doc.title)
def validate(self):
"""make page for this product"""
p = website.utils.add_page(self.doc.title)
"""make page for this product"""
if not self.doc.name:
self.doc.name = website.utils.page_name(self.doc.title)
p = website.utils.add_page(self.doc.name)
from jinja2 import Template
from webnotes.utils import global_date_format

View File

@@ -1,4 +1,6 @@
import webnotes
@webnotes.whitelist()
def subscribe(arg):
"""subscribe to blog (blog_subscriber)"""
if webnotes.conn.sql("""select name from `tabBlog Subscriber` where name=%s""", arg):

View File

@@ -1,5 +1,6 @@
import json, webnotes
@webnotes.whitelist()
def send(args):
"""create support ticket"""
args = json.loads(args)

View File

@@ -1,6 +1,8 @@
import webnotes
@webnotes.whitelist()
def unsubscribe(arg):
"""unsubscribe from lists"""
import webnotes
lists = [['Blog Subscriber', 'name']]
for l in lists:
webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)