Merge branch 'master' into edge
This commit is contained in:
commit
9578ad7c2a
3 changed files with 11 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ def get_defaults_for_match(userd):
|
|||
|
||||
def clear_cache(parent=None):
|
||||
def all_profiles():
|
||||
return webnotes.conn.sql_list("select name from tabProfile") + ["Control Panel"]
|
||||
return webnotes.conn.sql_list("select name from tabProfile") + ["Control Panel", "__global"]
|
||||
|
||||
if parent=="Control Panel" or not parent:
|
||||
parent = all_profiles()
|
||||
|
|
|
|||
|
|
@ -380,6 +380,9 @@ class Document:
|
|||
res = webnotes.model.meta.get_dt_values(self.doctype,
|
||||
'autoname, issingle, istable, name_case', as_dict=1)
|
||||
res = res and res[0] or {}
|
||||
|
||||
doctypelist = webnotes.get_doctype(self.doctype)
|
||||
res = doctypelist and doctypelist[0].fields or {}
|
||||
|
||||
if new:
|
||||
self.fields["__islocal"] = 1
|
||||
|
|
|
|||
7
wnf.py
7
wnf.py
|
|
@ -164,6 +164,8 @@ def setup_options():
|
|||
help="clear web cache")
|
||||
parser.add_option("--clear_cache", default=False, action="store_true",
|
||||
help="clear cache")
|
||||
parser.add_option("--clear_defaults", default=False, action="store_true",
|
||||
help="clear cache of defaults")
|
||||
|
||||
parser.add_option("--domain", metavar="DOMAIN",
|
||||
help="store domain in Website Settings", nargs=1)
|
||||
|
|
@ -430,6 +432,11 @@ def run():
|
|||
elif options.clear_cache:
|
||||
clear_cache()
|
||||
|
||||
elif options.clear_defaults:
|
||||
import webnotes.defaults
|
||||
webnotes.defaults.clear_cache()
|
||||
webnotes.clear_cache()
|
||||
|
||||
elif options.append_future_import:
|
||||
append_future_import()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue