mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 05:58:27 +00:00
use get_global_default instead of control panel
This commit is contained in:
11
patches/march_2013/p02_get_global_default.py
Normal file
11
patches/march_2013/p02_get_global_default.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import webnotes
|
||||
import webnotes.defaults
|
||||
|
||||
def execute():
|
||||
# sesison expiry missing
|
||||
if not webnotes.defaults.get_global_default("session_expiry"):
|
||||
gd = webnotes.bean("Global Defaults", "Global Defaults")
|
||||
gd.doc.session_expiry = webnotes.conn.get_value('Control Panel', None, 'session_expiry') \
|
||||
or '06:00'
|
||||
gd.save()
|
||||
|
||||
@@ -207,4 +207,5 @@ patch_list = [
|
||||
"patches.march_2013.p01_c_form",
|
||||
"execute:webnotes.conn.sql('update tabDocPerm set `submit`=1, `cancel`=1, `amend`=1 where parent=\"Time Log\"')",
|
||||
"execute:webnotes.delete_doc('DocType', 'Attendance Control Panel')",
|
||||
"patches.march_2013.p02_get_global_default",
|
||||
]
|
||||
Reference in New Issue
Block a user