Fetch defaults in purchase common and sales common related doctypes and fix minor utf-8 issues

This commit is contained in:
Anand Doshi
2012-02-07 10:48:11 +05:30
parent 99e7f3d7a4
commit d008964fd6
33 changed files with 3288 additions and 3044 deletions

View File

@@ -763,7 +763,7 @@ def send():
"""
edigest_list = webnotes.conn.sql("""
SELECT name FROM `tabEmail Digest`
WHERE enabled=1
WHERE enabled=1 and docstatus<2
""", as_list=1)
from webnotes.model.code import get_obj

View File

@@ -85,8 +85,9 @@ class DocType:
from webnotes.utils import file_manager
fn, content = file_manager.get_file(fid)
if not type(content) == str:
# NOTE: Don't know why this condition exists
if not isinstance(content, basestring) and hasattr(content, 'tostring'):
content = content.tostring()
return content
return content

View File

@@ -96,8 +96,9 @@ class DocType:
from webnotes.utils import file_manager
fn, content = file_manager.get_file(fid)
if not type(content) == str:
# NOTE: Don't know why this condition exists
if not isinstance(content, basestring) and hasattr(content, 'tostring'):
content = content.tostring()
return content