mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -17,7 +17,17 @@
|
|||||||
report.customize_filters = function() {
|
report.customize_filters = function() {
|
||||||
this.hide_all_filters();
|
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});
|
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,
|
recipients = filter(lambda r: r in valid_users,
|
||||||
self.doc.recipient_list.split("\n"))
|
self.doc.recipient_list.split("\n"))
|
||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
if recipients:
|
||||||
sendmail(recipients=recipients, subject=(self.doc.frequency + " Digest"),
|
from webnotes.utils.email_lib import sendmail
|
||||||
sender="ERPNext Notifications <notifications+email_digest@erpnext.com>",
|
sendmail(recipients=recipients, subject=(self.doc.frequency + " Digest"),
|
||||||
msg=self.get_digest_msg())
|
sender="ERPNext Notifications <notifications+email_digest@erpnext.com>",
|
||||||
|
msg=self.get_digest_msg())
|
||||||
|
|
||||||
def get_digest_msg(self):
|
def get_digest_msg(self):
|
||||||
""""""
|
""""""
|
||||||
|
|||||||
Reference in New Issue
Block a user