Merge branch 'develop'

This commit is contained in:
Pratik Vyas 2013-12-18 12:19:28 +05:30
commit 649660d9f0
6 changed files with 16 additions and 22 deletions

View File

@ -1,6 +1,6 @@
{
"app_name": "ERPNext",
"app_version": "3.3.0",
"app_version": "3.3.1",
"base_template": "app/portal/templates/base.html",
"modules": {
"Accounts": {
@ -74,5 +74,5 @@
"type": "module"
}
},
"requires_framework_version": "==3.3.0"
"requires_framework_version": "==3.3.1"
}

View File

@ -5,6 +5,8 @@ from __future__ import unicode_literals
import webnotes
def execute():
webnotes.reload_doc("setup", "doctype", "email_digest")
from webnotes.profile import get_system_managers
system_managers = get_system_managers(only_name=True)
if not system_managers:

View File

@ -16,8 +16,6 @@ import webnotes
from webnotes.utils import get_request_site_address, cstr
from webnotes import _
from backup_manager import ignore_list
@webnotes.whitelist()
def get_dropbox_authorize_url():
sess = get_dropbox_session()
@ -100,9 +98,7 @@ def backup_to_dropbox():
path = get_files_path()
for filename in os.listdir(path):
filename = cstr(filename)
if filename in ignore_list:
continue
found = False
filepath = os.path.join(path, filename)
for file_metadata in response["contents"]:

View File

@ -87,7 +87,7 @@ $.extend(cur_frm.cscript, {
cur_frm.save();
},
upload_backups_to_gdrive: function() {
cur_frm.save();
},
// upload_backups_to_gdrive: function() {
// cur_frm.save();
// },
});

View File

@ -7,8 +7,6 @@ from __future__ import unicode_literals
import webnotes
from webnotes import _
ignore_list = []
class DocType:
def __init__(self, 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)]
error_message = ("\n".join(file_and_error) + "\n" + webnotes.getTraceback())
webnotes.errprint(error_message)
if not webnotes.conn:
webnotes.connect()
send_email(False, "Dropbox", error_message)
#backup to gdrive
@ -62,6 +56,7 @@ def take_backups_gdrive():
send_email(False, "Google Drive", error_message)
def send_email(success, service_name, error_status=None):
from webnotes.utils.email_lib import sendmail
if success:
subject = "Backup Upload Successful"
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>
""" % (service_name, error_status)
# email system managers
from webnotes.utils.email_lib import sendmail
sendmail(webnotes.conn.get_value("Backup Manager", None, "send_notifications_to").split(","),
subject=subject, msg=message)
if not webnotes.conn:
webnotes.connect()
recipients = webnotes.conn.get_value("Backup Manager", None, "send_notifications_to").split(",")
sendmail(recipients, subject=subject, msg=message)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:10",
"docstatus": 0,
"modified": "2013-11-02 19:41:45",
"modified": "2013-12-18 10:38:39",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -326,7 +326,7 @@
"fieldname": "schedule_date",
"fieldtype": "Date",
"label": "Required By",
"no_copy": 1,
"no_copy": 0,
"oldfieldname": "schedule_date",
"oldfieldtype": "Date",
"print_hide": 1,