Merge branch 'edge' of github.com:webnotes/erpnext into edge
This commit is contained in:
commit
0394f78382
@ -52,6 +52,6 @@ def get_children():
|
||||
currency = webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", company)[0][0]
|
||||
for each in acc:
|
||||
bal = get_balance_on(each.get("value"))
|
||||
each['balance'] = currency + ' ' + fmt_money(bal)
|
||||
each['balance'] = currency + ' ' + str(bal or 0)
|
||||
|
||||
return acc
|
||||
|
@ -267,8 +267,19 @@ def clear_cache(page_name=None):
|
||||
if page_name:
|
||||
delete_page_cache(page_name)
|
||||
else:
|
||||
webnotes.cache().delete_keys("page:")
|
||||
|
||||
cache = webnotes.cache()
|
||||
for p in get_all_pages():
|
||||
cache.delete_value("page:" + p)
|
||||
|
||||
def get_all_pages():
|
||||
all_pages = get_template_pages()
|
||||
all_pages += page_settings_map.keys()
|
||||
for doctype in page_map:
|
||||
all_pages += [p[0] for p in webnotes.conn.sql("""select distinct page_name
|
||||
from `tab%s`""" % doctype) if p[0]]
|
||||
|
||||
return all_pages
|
||||
|
||||
def delete_page_cache(page_name):
|
||||
if page_name:
|
||||
webnotes.cache().delete_value("page:" + page_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user