diff --git a/client/desk/reportpage.js b/client/desk/reportpage.js index 1b3d7db2..d218c6f1 100644 --- a/client/desk/reportpage.js +++ b/client/desk/reportpage.js @@ -42,7 +42,7 @@ module.exports = class ReportPage extends Page { getFilterValues() { const values = {}; - for (let control of this.form.controlList) { + for (let control of this.form.formLayout.controlList) { values[control.fieldname] = control.getInputValue(); if (control.required && !values[control.fieldname]) { frappe.ui.showAlert({message: frappe._('{0} is mandatory', control.label), color: 'red'}); @@ -75,7 +75,10 @@ module.exports = class ReportPage extends Page { const filterValues = this.getFilterValues(); if (filterValues === false) return; - let data = await frappe.call(this.method, filterValues); + let data = await frappe.call({ + method: this.method, + args: filterValues + }); this.datatable.refresh(data); } diff --git a/client/view/form.js b/client/view/form.js index 409f03c7..24785afc 100644 --- a/client/view/form.js +++ b/client/view/form.js @@ -11,7 +11,9 @@ module.exports = class BaseForm extends Observable { Object.assign(this, arguments[0]); this.links = []; - this.meta = frappe.getMeta(this.doctype); + if (!this.meta) { + this.meta = frappe.getMeta(this.doctype); + } if (this.setup) { this.setup(); diff --git a/server/pdf.js b/server/pdf.js index 862fa1a0..044c15ef 100644 --- a/server/pdf.js +++ b/server/pdf.js @@ -20,7 +20,7 @@ async function makePDF(html, filepath) { async function getPDFForElectron(doctype, name) { const html = await getHTML(doctype, name); - const filepath = path.join(frappe.electronConfig.directory, name + '.pdf'); + const filepath = path.join(frappe.electronSettings.directory, name + '.pdf'); await makePDF(html, filepath); shell.openItem(filepath); }