Merge branch 'develop'
This commit is contained in:
commit
649660d9f0
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"app_name": "ERPNext",
|
"app_name": "ERPNext",
|
||||||
"app_version": "3.3.0",
|
"app_version": "3.3.1",
|
||||||
"base_template": "app/portal/templates/base.html",
|
"base_template": "app/portal/templates/base.html",
|
||||||
"modules": {
|
"modules": {
|
||||||
"Accounts": {
|
"Accounts": {
|
||||||
@ -74,5 +74,5 @@
|
|||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requires_framework_version": "==3.3.0"
|
"requires_framework_version": "==3.3.1"
|
||||||
}
|
}
|
@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
|||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
webnotes.reload_doc("setup", "doctype", "email_digest")
|
||||||
|
|
||||||
from webnotes.profile import get_system_managers
|
from webnotes.profile import get_system_managers
|
||||||
system_managers = get_system_managers(only_name=True)
|
system_managers = get_system_managers(only_name=True)
|
||||||
if not system_managers:
|
if not system_managers:
|
||||||
|
@ -16,8 +16,6 @@ import webnotes
|
|||||||
from webnotes.utils import get_request_site_address, cstr
|
from webnotes.utils import get_request_site_address, cstr
|
||||||
from webnotes import _
|
from webnotes import _
|
||||||
|
|
||||||
from backup_manager import ignore_list
|
|
||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
def get_dropbox_authorize_url():
|
def get_dropbox_authorize_url():
|
||||||
sess = get_dropbox_session()
|
sess = get_dropbox_session()
|
||||||
@ -100,9 +98,7 @@ def backup_to_dropbox():
|
|||||||
path = get_files_path()
|
path = get_files_path()
|
||||||
for filename in os.listdir(path):
|
for filename in os.listdir(path):
|
||||||
filename = cstr(filename)
|
filename = cstr(filename)
|
||||||
if filename in ignore_list:
|
|
||||||
continue
|
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
filepath = os.path.join(path, filename)
|
filepath = os.path.join(path, filename)
|
||||||
for file_metadata in response["contents"]:
|
for file_metadata in response["contents"]:
|
||||||
|
@ -87,7 +87,7 @@ $.extend(cur_frm.cscript, {
|
|||||||
cur_frm.save();
|
cur_frm.save();
|
||||||
},
|
},
|
||||||
|
|
||||||
upload_backups_to_gdrive: function() {
|
// upload_backups_to_gdrive: function() {
|
||||||
cur_frm.save();
|
// cur_frm.save();
|
||||||
},
|
// },
|
||||||
});
|
});
|
@ -7,8 +7,6 @@ from __future__ import unicode_literals
|
|||||||
import webnotes
|
import webnotes
|
||||||
from webnotes import _
|
from webnotes import _
|
||||||
|
|
||||||
ignore_list = []
|
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, d, dl):
|
def __init__(self, d, dl):
|
||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
@ -39,10 +37,6 @@ def take_backups_dropbox():
|
|||||||
file_and_error = [" - ".join(f) for f in zip(did_not_upload, error_log)]
|
file_and_error = [" - ".join(f) for f in zip(did_not_upload, error_log)]
|
||||||
error_message = ("\n".join(file_and_error) + "\n" + webnotes.getTraceback())
|
error_message = ("\n".join(file_and_error) + "\n" + webnotes.getTraceback())
|
||||||
webnotes.errprint(error_message)
|
webnotes.errprint(error_message)
|
||||||
|
|
||||||
if not webnotes.conn:
|
|
||||||
webnotes.connect()
|
|
||||||
|
|
||||||
send_email(False, "Dropbox", error_message)
|
send_email(False, "Dropbox", error_message)
|
||||||
|
|
||||||
#backup to gdrive
|
#backup to gdrive
|
||||||
@ -62,6 +56,7 @@ def take_backups_gdrive():
|
|||||||
send_email(False, "Google Drive", error_message)
|
send_email(False, "Google Drive", error_message)
|
||||||
|
|
||||||
def send_email(success, service_name, error_status=None):
|
def send_email(success, service_name, error_status=None):
|
||||||
|
from webnotes.utils.email_lib import sendmail
|
||||||
if success:
|
if success:
|
||||||
subject = "Backup Upload Successful"
|
subject = "Backup Upload Successful"
|
||||||
message ="""<h3>Backup Uploaded Successfully</h3><p>Hi there, this is just to inform you
|
message ="""<h3>Backup Uploaded Successfully</h3><p>Hi there, this is just to inform you
|
||||||
@ -76,7 +71,8 @@ def send_email(success, service_name, error_status=None):
|
|||||||
<p>Please contact your system manager for more information.</p>
|
<p>Please contact your system manager for more information.</p>
|
||||||
""" % (service_name, error_status)
|
""" % (service_name, error_status)
|
||||||
|
|
||||||
# email system managers
|
if not webnotes.conn:
|
||||||
from webnotes.utils.email_lib import sendmail
|
webnotes.connect()
|
||||||
sendmail(webnotes.conn.get_value("Backup Manager", None, "send_notifications_to").split(","),
|
|
||||||
subject=subject, msg=message)
|
recipients = webnotes.conn.get_value("Backup Manager", None, "send_notifications_to").split(",")
|
||||||
|
sendmail(recipients, subject=subject, msg=message)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:10",
|
"creation": "2013-05-24 19:29:10",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 19:41:45",
|
"modified": "2013-12-18 10:38:39",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -326,7 +326,7 @@
|
|||||||
"fieldname": "schedule_date",
|
"fieldname": "schedule_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"label": "Required By",
|
"label": "Required By",
|
||||||
"no_copy": 1,
|
"no_copy": 0,
|
||||||
"oldfieldname": "schedule_date",
|
"oldfieldname": "schedule_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user