sync with gateway moved to defs
This commit is contained in:
parent
0d738cf75b
commit
d5f041d5a0
3 changed files with 8 additions and 4 deletions
|
|
@ -47,7 +47,9 @@ class DocType:
|
|||
webnotes.conn.set(self.doc,'module',doctype_module and doctype_module[0][0] or 'NULL')
|
||||
|
||||
def validate(self):
|
||||
if webnotes.conn.sql("select name from `tabSearch Criteria` where criteria_name=%s and name!=%s", (self.doc.criteria_name, self.doc.name)):
|
||||
if webnotes.conn.sql("select name from `tabSearch Criteria` where \
|
||||
criteria_name=%s and name!=%s", (self.doc.criteria_name,
|
||||
self.doc.name)):
|
||||
webnotes.msgprint("Criteria Name '%s' already used, please use another name" % self.doc.criteria_name, raise_exception = 1)
|
||||
|
||||
def on_update(self):
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ def get_bootinfo():
|
|||
for field in ['mail_login', 'mail_password', 'mail_port', 'outgoing_mail_server', 'use_ssl']:
|
||||
del cp[field]
|
||||
|
||||
import webnotes.defs
|
||||
from webnotes.utils import cint
|
||||
cp['sync_with_gateway'] = hasattr(webnotes.defs, 'sync_with_gateway') and \
|
||||
cint(webnotes.defs.sync_with_gateway) or 0
|
||||
|
||||
# system info
|
||||
bootinfo['control_panel'] = cp.copy()
|
||||
bootinfo['account_name'] = cp.get('account_id')
|
||||
|
|
|
|||
|
|
@ -139,6 +139,3 @@ backup_link_path = '/var/www/wnframework/backups'
|
|||
# url to be emailed to the "System Manager" Role to download
|
||||
# the backup
|
||||
backup_url = 'http://localhost/backups'
|
||||
|
||||
# System TimeZone (should be acceptable by pytz: Recommended format Continent/City)
|
||||
system_timezone = 'Asia/Kolkata'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue