Merge pull request #2202 from 81552433qqcom/develop
hotfix for project wise report and translation.
This commit is contained in:
commit
a23151b138
@ -26,7 +26,7 @@ def get_columns():
|
|||||||
_("Cost of Issued Items") + ":Currency:160", _("Cost of Delivered Items") + ":Currency:160",
|
_("Cost of Issued Items") + ":Currency:160", _("Cost of Delivered Items") + ":Currency:160",
|
||||||
_("Project Name") + "::120", _("Project Status") + "::120", _("Company") + ":Link/Company:100",
|
_("Project Name") + "::120", _("Project Status") + "::120", _("Company") + ":Link/Company:100",
|
||||||
_("Customer") + ":Link/Customer:140", _("Project Value") + ":Currency:120",
|
_("Customer") + ":Link/Customer:140", _("Project Value") + ":Currency:120",
|
||||||
_("Project Start Date") + ":Date:120", _("Completion Date") + ":Date:120"]+
|
_("Project Start Date") + ":Date:120", _("Completion Date") + ":Date:120"]
|
||||||
|
|
||||||
def get_project_details():
|
def get_project_details():
|
||||||
return frappe.db.sql(""" select name, project_name, status, company, customer, project_value,
|
return frappe.db.sql(""" select name, project_name, status, company, customer, project_value,
|
||||||
|
@ -73,7 +73,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
|
|||||||
var fullname = frappe.user.full_name(v.name);
|
var fullname = frappe.user.full_name(v.name);
|
||||||
if(fullname !== v.name) v.name = fullname + " <" + v.name + ">";
|
if(fullname !== v.name) v.name = fullname + " <" + v.name + ">";
|
||||||
if(v.enabled==0) {
|
if(v.enabled==0) {
|
||||||
v.name = repl("<span style='color: red'> %(name)s (disabled user)</span>", {name: v.name});
|
v.name = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
|
||||||
}
|
}
|
||||||
var user = $a($td(tab, i+1, 1), 'span', '', '', v.name);
|
var user = $a($td(tab, i+1, 1), 'span', '', '', v.name);
|
||||||
//user.onclick = function() { check.checked = !check.checked; }
|
//user.onclick = function() { check.checked = !check.checked; }
|
||||||
@ -81,11 +81,11 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
|
|||||||
|
|
||||||
// Display add recipients button
|
// Display add recipients button
|
||||||
if(r.user_list.length>15) {
|
if(r.user_list.length>15) {
|
||||||
$btn($td(tab, 0, 1), add_or_update + ' Recipients', function() {
|
$btn($td(tab, 0, 1), __('{0} Recipients',[__(add_or_update)]), function() {
|
||||||
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
|
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$btn($td(tab, r.user_list.length+1, 1), add_or_update + ' Recipients', function() {
|
$btn($td(tab, r.user_list.length+1, 1),__('{0} Recipients',[__(add_or_update)]), function() {
|
||||||
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
|
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ class EmailDigest(Document):
|
|||||||
with_value = "\n".join(with_value)
|
with_value = "\n".join(with_value)
|
||||||
else:
|
else:
|
||||||
has_updates = False
|
has_updates = False
|
||||||
with_value = "<p>There were no updates in the items selected for this digest.</p><hr>"
|
with_value = "<p>" + _("There were no updates in the items selected for this digest.") + "</p><hr>"
|
||||||
|
|
||||||
if not has_updates and send_only_if_updates:
|
if not has_updates and send_only_if_updates:
|
||||||
return
|
return
|
||||||
@ -137,7 +137,7 @@ class EmailDigest(Document):
|
|||||||
# seperate out no value items
|
# seperate out no value items
|
||||||
no_value = [o[1] for o in out if not o[0]]
|
no_value = [o[1] for o in out if not o[0]]
|
||||||
if no_value:
|
if no_value:
|
||||||
no_value = """<h4>No Updates For:</h4>""" + "\n".join(no_value)
|
no_value = """<h4>""" + _("No Updates For") + """:</h4>""" + "\n".join(no_value)
|
||||||
|
|
||||||
date = self.frequency == "Daily" and formatdate(self.from_date) or \
|
date = self.frequency == "Daily" and formatdate(self.from_date) or \
|
||||||
"%s to %s" % (formatdate(self.from_date), formatdate(self.to_date))
|
"%s to %s" % (formatdate(self.from_date), formatdate(self.to_date))
|
||||||
@ -311,9 +311,9 @@ class EmailDigest(Document):
|
|||||||
(e.subject, datetime_in_user_format(e.starts_on), datetime_in_user_format(e.ends_on))
|
(e.subject, datetime_in_user_format(e.starts_on), datetime_in_user_format(e.ends_on))
|
||||||
|
|
||||||
if html:
|
if html:
|
||||||
return 1, "<h4>Upcoming Calendar Events (max 10):</h4><ul>" + html + "</ul><hr>"
|
return 1, "<h4>" + _("Upcoming Calendar Events (max 10)") + ":</h4><ul>" + html + "</ul><hr>"
|
||||||
else:
|
else:
|
||||||
return 0, "<p>Calendar Events</p>"
|
return 0, "<p>" + _("Calendar Events") + "</p>"
|
||||||
|
|
||||||
def get_todo_list(self, user_id):
|
def get_todo_list(self, user_id):
|
||||||
todo_list = frappe.db.sql("""select *
|
todo_list = frappe.db.sql("""select *
|
||||||
|
@ -14,9 +14,9 @@ $.extend(cur_frm.cscript, {
|
|||||||
cur_frm.cscript.make_listing(doc);
|
cur_frm.cscript.make_listing(doc);
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
if(cur_frm.fields_dict.status.get_status()=="Write") {
|
if(cur_frm.fields_dict.status.get_status()=="Write") {
|
||||||
if(doc.status!='Closed') cur_frm.add_custom_button('Close',
|
if(doc.status!='Closed') cur_frm.add_custom_button(__('Close'),
|
||||||
cur_frm.cscript['Close Ticket'], "icon-ok", "btn-success");
|
cur_frm.cscript['Close Ticket'], "icon-ok", "btn-success");
|
||||||
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket',
|
if(doc.status=='Closed') cur_frm.add_custom_button(__('Re-Open Ticket'),
|
||||||
cur_frm.cscript['Re-Open Ticket'], null, "btn-default");
|
cur_frm.cscript['Re-Open Ticket'], null, "btn-default");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user