Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
82090df43d
@ -17,7 +17,17 @@
|
||||
report.customize_filters = function() {
|
||||
this.hide_all_filters();
|
||||
|
||||
this.add_filter({fieldname:'transaction', label:'Transaction', fieldtype:'Select', options:'Quotation'+NEWLINE+'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice'+NEWLINE+'Purchase Order'+NEWLINE+'Purchase Receipt'+NEWLINE+'Purchase Invoice',report_default:'Delivery Note',ignore : 1,parent:'Profile',in_first_page : 1,single_select : 1});
|
||||
// hide transaction based on permissions
|
||||
var all_transactions = ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice",
|
||||
"Purchase Order", "Purchase Receipt", "Purchase Invoice"];
|
||||
var transaction_list = [];
|
||||
$.each(all_transactions, function(i, dt) {
|
||||
if(wn.boot.profile.can_read.indexOf(dt)!=-1) {
|
||||
transaction_list.push(dt);
|
||||
}
|
||||
});
|
||||
|
||||
this.add_filter({fieldname:'transaction', label:'Transaction', fieldtype:'Select', options:transaction_list.join(NEWLINE),report_default:'Delivery Note',ignore : 1,parent:'Profile',in_first_page : 1,single_select : 1});
|
||||
|
||||
this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Profile',in_first_page:1,single_select:1});
|
||||
|
||||
|
@ -56,10 +56,11 @@ class DocType:
|
||||
recipients = filter(lambda r: r in valid_users,
|
||||
self.doc.recipient_list.split("\n"))
|
||||
|
||||
from webnotes.utils.email_lib import sendmail
|
||||
sendmail(recipients=recipients, subject=(self.doc.frequency + " Digest"),
|
||||
sender="ERPNext Notifications <notifications+email_digest@erpnext.com>",
|
||||
msg=self.get_digest_msg())
|
||||
if recipients:
|
||||
from webnotes.utils.email_lib import sendmail
|
||||
sendmail(recipients=recipients, subject=(self.doc.frequency + " Digest"),
|
||||
sender="ERPNext Notifications <notifications+email_digest@erpnext.com>",
|
||||
msg=self.get_digest_msg())
|
||||
|
||||
def get_digest_msg(self):
|
||||
""""""
|
||||
|
Loading…
x
Reference in New Issue
Block a user