Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
fa99fc683a
@ -62,12 +62,14 @@ class DocType:
|
||||
def update_details(self):
|
||||
vouchers = []
|
||||
for d in getlist(self.doclist, 'entries'):
|
||||
if d.clearance_date and d.cheque_date:
|
||||
if getdate(d.clearance_date) < getdate(d.cheque_date):
|
||||
if d.clearance_date:
|
||||
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
|
||||
msgprint("Clearance Date can not be before Cheque Date (Row #%s)" %
|
||||
d.idx, raise_exception=1)
|
||||
|
||||
sql("update `tabJournal Voucher` set clearance_date = %s, modified = %s where name=%s", (d.clearance_date, nowdate(), d.voucher_id))
|
||||
sql("""update `tabJournal Voucher`
|
||||
set clearance_date = %s, modified = %s where name=%s""",
|
||||
(d.clearance_date, nowdate(), d.voucher_id))
|
||||
vouchers.append(d.voucher_id)
|
||||
|
||||
if vouchers:
|
||||
|
@ -438,14 +438,17 @@ def manage_recurring_invoices():
|
||||
|
||||
|
||||
def notify_errors(inv, owner):
|
||||
import webnotes
|
||||
import website
|
||||
|
||||
exception_msg = """
|
||||
Dear User,
|
||||
|
||||
An error occured while creating recurring invoice from %s.
|
||||
An error occured while creating recurring invoice from %s (at %s).
|
||||
|
||||
May be there are some invalid email ids mentioned in the invoice.
|
||||
|
||||
To stop sending repetitive error notifications from the system, we have unchecked \
|
||||
To stop sending repetitive error notifications from the system, we have unchecked
|
||||
"Convert into Recurring" field in the invoice %s.
|
||||
|
||||
|
||||
@ -458,11 +461,15 @@ def notify_errors(inv, owner):
|
||||
Regards,
|
||||
Administrator
|
||||
|
||||
""" % (inv, inv)
|
||||
""" % (inv, website.get_site_address(), inv)
|
||||
subj = "[Urgent] Error while creating recurring invoice from %s" % inv
|
||||
import webnotes.utils
|
||||
recipients = webnotes.utils.get_system_managers_list()
|
||||
recipients += ['support@erpnext.com', owner]
|
||||
|
||||
from webnotes.profile import get_system_managers
|
||||
recipients = get_system_managers()
|
||||
owner_email = webnotes.conn.get_value("Profile", owner, "email")
|
||||
if not owner_email in recipients:
|
||||
recipients.append(owner_email)
|
||||
|
||||
assign_task_to_owner(inv, exception_msg, recipients)
|
||||
sendmail(recipients, subject=subj, msg = exception_msg)
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
u'creation': '2012-05-04 10:21:24',
|
||||
u'creation': '2012-10-02 18:51:46',
|
||||
u'docstatus': 0,
|
||||
u'modified': '2012-10-02 16:43:51',
|
||||
u'modified': '2012-10-15 12:38:42',
|
||||
u'modified_by': u'Administrator',
|
||||
u'owner': u'Administrator'
|
||||
},
|
||||
@ -235,11 +235,13 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'eg. Cheque Number',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'cheque_no',
|
||||
'fieldtype': u'Data',
|
||||
'in_filter': 1,
|
||||
'label': u'Cheque No',
|
||||
'label': u'Reference Number',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'cheque_no',
|
||||
'oldfieldtype': u'Data',
|
||||
@ -252,7 +254,7 @@
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'cheque_date',
|
||||
'fieldtype': u'Date',
|
||||
'label': u'Cheque Date',
|
||||
'label': u'Reference Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'cheque_date',
|
||||
'oldfieldtype': u'Date',
|
||||
@ -743,6 +745,30 @@
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
u'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Accounts User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
u'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Accounts User',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
@ -769,14 +795,14 @@
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
u'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Accounts User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
'role': u'Auditor',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
@ -786,7 +812,7 @@
|
||||
'create': 0,
|
||||
u'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'Accounts User',
|
||||
'role': u'Auditor',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:35:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:35:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
u'creation': '2012-07-03 13:29:42',
|
||||
u'docstatus': 0,
|
||||
u'modified': '2012-10-15 15:23:02',
|
||||
u'modified_by': u'Administrator',
|
||||
u'owner': u'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
@ -15,33 +15,45 @@
|
||||
'autoname': u'_FEED.#####',
|
||||
'colour': u'White:FFF',
|
||||
'default_print_format': u'Standard',
|
||||
'doctype': 'DocType',
|
||||
u'doctype': u'DocType',
|
||||
'module': u'Home',
|
||||
'name': '__common__',
|
||||
u'name': u'__common__',
|
||||
'section_style': u'Simple',
|
||||
'show_in_menu': 0,
|
||||
'version': 3
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'name': '__common__',
|
||||
u'doctype': u'DocField',
|
||||
u'name': u'__common__',
|
||||
'parent': u'Feed',
|
||||
'parentfield': u'fields',
|
||||
'parenttype': u'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
u'doctype': u'DocPerm',
|
||||
u'name': u'__common__',
|
||||
'parent': u'Feed',
|
||||
'parentfield': u'permissions',
|
||||
'parenttype': u'DocType',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'System Manager'
|
||||
},
|
||||
|
||||
# DocType, Feed
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': u'Feed'
|
||||
u'doctype': u'DocType',
|
||||
u'name': u'Feed'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'feed_type',
|
||||
'fieldtype': u'Select',
|
||||
'label': u'Feed Type'
|
||||
@ -49,7 +61,7 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'doc_type',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'Doc Type'
|
||||
@ -57,7 +69,7 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'doc_name',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'Doc Name'
|
||||
@ -65,7 +77,7 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'subject',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'Subject'
|
||||
@ -73,7 +85,7 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'color',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'Color'
|
||||
@ -81,9 +93,14 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'full_name',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'Full Name'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
u'doctype': u'DocPerm'
|
||||
}
|
||||
]
|
@ -1,6 +1,7 @@
|
||||
wn.pages['activity'].onload = function(wrapper) {
|
||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
|
||||
wrapper.appframe.title('Activity');
|
||||
|
||||
var list = new wn.ui.Listing({
|
||||
appframe: wrapper.appframe,
|
||||
method: 'home.page.activity.activity.get_feed',
|
||||
@ -10,6 +11,13 @@ wn.pages['activity'].onload = function(wrapper) {
|
||||
}
|
||||
});
|
||||
list.run();
|
||||
|
||||
// Build Report Button
|
||||
if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) {
|
||||
wrapper.appframe.add_button('Build Report', function() {
|
||||
wn.set_route('Report2', "Feed");
|
||||
}, 'icon-th')
|
||||
}
|
||||
}
|
||||
|
||||
erpnext.last_feed_date = false;
|
||||
|
@ -38,7 +38,6 @@ class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
self.prefix = is_testing and 'test' or 'tab'
|
||||
|
||||
def validate(self):
|
||||
import string
|
||||
|
@ -140,8 +140,8 @@ class DocType:
|
||||
import webnotes
|
||||
companies_list = webnotes.conn.sql("SELECT company_name FROM `tabCompany`", as_list=1)
|
||||
|
||||
import webnotes.utils
|
||||
system_managers = webnotes.utils.get_system_managers_list()
|
||||
from webnotes.profile import get_system_managers
|
||||
system_managers = get_system_managers()
|
||||
if not system_managers: return
|
||||
|
||||
from webnotes.model.doc import Document
|
||||
|
@ -43,7 +43,7 @@ def on_login_post_session(login_manager):
|
||||
from webnotes.utils import nowtime
|
||||
from webnotes.profile import get_user_fullname
|
||||
home.make_feed('Login', 'Profile', login_manager.user, login_manager.user,
|
||||
'%s logged in at %s' % (get_user_fullname, nowtime()),
|
||||
'%s logged in at %s' % (get_user_fullname(login_manager.user), nowtime()),
|
||||
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
|
||||
|
||||
|
||||
|
@ -23,4 +23,16 @@ def send_message():
|
||||
webnotes.msgprint('Please give us your email id so that we can write back to you', raise_exception=True)
|
||||
|
||||
d.save()
|
||||
webnotes.msgprint('Thank you!')
|
||||
webnotes.msgprint('Thank you!')
|
||||
|
||||
def get_site_address():
|
||||
from webnotes.utils import get_request_site_address
|
||||
url = get_request_site_address()
|
||||
|
||||
if not url or url=='http://localhost':
|
||||
new_url = webnotes.conn.get_value('Website Settings', 'Website Settings',
|
||||
'subdomain')
|
||||
if new_url:
|
||||
url = "http://" + new_url
|
||||
|
||||
return url
|
Loading…
x
Reference in New Issue
Block a user