mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 23:18:02 +00:00
Merge branch 'stable' into latest
Conflicts: erpnext/accounts/doctype/journal_voucher/journal_voucher.js erpnext/accounts/doctype/payable_voucher/payable_voucher.js index.html version.num
This commit is contained in:
@@ -520,7 +520,8 @@ class DocType:
|
||||
currency = company.default_currency
|
||||
|
||||
def table(args):
|
||||
if type(args['body']) == type(''):
|
||||
table_body = ""
|
||||
if isinstance(args['body'], basestring):
|
||||
table_body = """\
|
||||
<tbody><tr>
|
||||
<td style='padding: 5px; font-size: 24px; \
|
||||
@@ -530,7 +531,7 @@ class DocType:
|
||||
</td>
|
||||
</tr></tbody>"""
|
||||
|
||||
elif type(args['body'] == type([])):
|
||||
elif isinstance(args['body'], list):
|
||||
body_rows = []
|
||||
for rows in args['body']:
|
||||
for r in rows:
|
||||
@@ -762,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,11 +46,7 @@ class DocType:
|
||||
|
||||
#=======================================================================================================
|
||||
def get_page_lst(self,nm):
|
||||
|
||||
r1 = cstr(webnotes.user.get_roles()).replace('[','').replace(']','')
|
||||
|
||||
ret = sql("select parent from `tabPage Role` where role in (%s) and parent = '%s'"%(r1,nm))
|
||||
|
||||
ret = sql("select parent from `tabPage Role` where role in ('%s') and parent = '%s'" % ("','".join(webnotes.user.get_roles()),nm))
|
||||
return ret and True or False
|
||||
|
||||
#=======================================================================================================
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user