mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Merge branch 'edge' of github.com:webnotes/erpnext into edge
This commit is contained in:
@@ -52,6 +52,6 @@ def get_children():
|
|||||||
currency = webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", company)[0][0]
|
currency = webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", company)[0][0]
|
||||||
for each in acc:
|
for each in acc:
|
||||||
bal = get_balance_on(each.get("value"))
|
bal = get_balance_on(each.get("value"))
|
||||||
each['balance'] = currency + ' ' + fmt_money(bal)
|
each['balance'] = currency + ' ' + str(bal or 0)
|
||||||
|
|
||||||
return acc
|
return acc
|
||||||
|
|||||||
@@ -267,7 +267,18 @@ def clear_cache(page_name=None):
|
|||||||
if page_name:
|
if page_name:
|
||||||
delete_page_cache(page_name)
|
delete_page_cache(page_name)
|
||||||
else:
|
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):
|
def delete_page_cache(page_name):
|
||||||
if page_name:
|
if page_name:
|
||||||
|
|||||||
Reference in New Issue
Block a user