Merge branch 'stable' of github.com:webnotes/erpnext into latest
This commit is contained in:
commit
04048ff890
@ -520,7 +520,8 @@ class DocType:
|
|||||||
currency = company.default_currency
|
currency = company.default_currency
|
||||||
|
|
||||||
def table(args):
|
def table(args):
|
||||||
if type(args['body']) == type(''):
|
table_body = ""
|
||||||
|
if isinstance(args['body'], basestring):
|
||||||
table_body = """\
|
table_body = """\
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td style='padding: 5px; font-size: 24px; \
|
<td style='padding: 5px; font-size: 24px; \
|
||||||
@ -530,7 +531,7 @@ class DocType:
|
|||||||
</td>
|
</td>
|
||||||
</tr></tbody>"""
|
</tr></tbody>"""
|
||||||
|
|
||||||
elif type(args['body'] == type([])):
|
elif isinstance(args['body'], list):
|
||||||
body_rows = []
|
body_rows = []
|
||||||
for rows in args['body']:
|
for rows in args['body']:
|
||||||
for r in rows:
|
for r in rows:
|
||||||
|
|||||||
@ -46,11 +46,7 @@ class DocType:
|
|||||||
|
|
||||||
#=======================================================================================================
|
#=======================================================================================================
|
||||||
def get_page_lst(self,nm):
|
def get_page_lst(self,nm):
|
||||||
|
ret = sql("select parent from `tabPage Role` where role in ('%s') and parent = '%s'" % ("','".join(webnotes.user.get_roles()),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))
|
|
||||||
|
|
||||||
return ret and True or False
|
return ret and True or False
|
||||||
|
|
||||||
#=======================================================================================================
|
#=======================================================================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user