Parcourir la source

Query Report Title Integration

version-14
Syed Qadeer il y a 11 ans
Parent
révision
54c918425e
2 fichiers modifiés avec 13 ajouts et 2 suppressions
  1. +1
    -0
      public/js/wn/views/query_report.js
  2. +12
    -2
      webnotes/widgets/query_report.py

+ 1
- 0
public/js/wn/views/query_report.js Voir le fichier

@@ -92,6 +92,7 @@ wn.views.QueryReport = Class.extend({
report_name: me.report_name
},
callback: function(r) {
me.appframe.set_title(wn._("Query Report")+": " + wn._(me.report_name));
wn.dom.eval(r.message || "");
me.setup_filters();
me.refresh();


+ 12
- 2
webnotes/widgets/query_report.py Voir le fichier

@@ -16,11 +16,21 @@ import webnotes.widgets.reportview
def get_script(report_name):
report = webnotes.doc("Report", report_name)
script_path = os.path.join(get_module_path(webnotes.conn.get_value("DocType", report.ref_doctype, "module")),
doctype = webnotes.conn.get_value("DocType", report.ref_doctype, "module")
script_path = os.path.join(get_module_path(doctype),
"report", scrub(report.name), scrub(report.name) + ".js")
locale_path = os.path.join(get_module_path(webnotes.conn.get_value(doctype)),
"report", scrub(report.name))
if os.path.exists(script_path):
with open(script_path, "r") as script:
# load translations
if webnotes.lang != "en":
from webnotes.modules import get_doc_path
from webnotes.translate import get_lang_data
#d = doclist[0]
messages = get_lang_data(locale_path,
webnotes.lang, 'js')
webnotes.response["__messages"] = messages
return script.read()
elif report.javascript:
return report.javascript


Chargement…
Annuler
Enregistrer