Merge branch 'staging-fixes' into staging

This commit is contained in:
Ameya Shenoy 2018-10-17 09:42:40 +00:00
commit 7fb04a86f8
No known key found for this signature in database
GPG key ID: AC016A555657D0A3
8 changed files with 21 additions and 18 deletions

View file

@ -17,7 +17,7 @@ from faker import Faker
from .exceptions import *
from .utils.jinja import (get_jenv, get_template, render_template, get_email_from_template, get_jloader)
__version__ = '10.1.52'
__version__ = '10.1.53'
__title__ = "Frappe Framework"
local = Local()

View file

@ -191,10 +191,11 @@ def get_prepared_report_result(report, filters, dn=""):
doc = frappe.get_doc("Prepared Report", doc_list[0])
data = read_csv_content_from_attached_file(doc)
latest_report_data = {
"columns": data[0],
"result": data[1:]
}
if data:
latest_report_data = {
"columns": data[0],
"result": data[1:]
}
latest_report_data.update({
"prepared_report": True,

View file

@ -12,7 +12,7 @@ source_link = "https://github.com/frappe/frappe"
app_license = "MIT"
develop_version = '11.x.x-develop'
staging_version = '11.0.3-beta.10'
staging_version = '11.0.3-beta.11'
app_email = "info@frappe.io"

View file

@ -139,7 +139,9 @@ frappe.ui.Filter = class {
value = value.join(',');
}
if (value !== undefined || value !== null) {
if (Array.isArray(value)) {
this._filter_value_set = this.field.set_value(value);
} else if (value !== undefined || value !== null) {
this._filter_value_set = this.field.set_value((value + '').trim());
}
return this._filter_value_set;

View file

@ -799,8 +799,8 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
const totals = this.get_columns_totals(data);
const totals_row = this.columns.map((col, i) => {
return {
name: 'Totals Row',
content: totals[col.field],
name: __('Totals Row'),
content: totals[col.id],
format: value => {
return frappe.format(value, col.docfield, { always_show_decimals: true });
}
@ -942,13 +942,13 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
this.columns.forEach((col, i) => {
const totals = data.reduce((totals, d) => {
if (col.field in d && frappe.model.is_numeric_field(col.docfield)) {
totals += flt(d[col.field]);
if (col.id in d && frappe.model.is_numeric_field(col.docfield)) {
totals += flt(d[col.id]);
return totals;
}
}, 0);
row_totals[col.field] = totals;
row_totals[col.id] = totals;
});
return row_totals;

View file

@ -527,4 +527,4 @@ _f.Frm.prototype.get_sum = function(table_fieldname, fieldname) {
sum += d[fieldname];
}
return sum;
};
};

View file

@ -19,7 +19,7 @@
"awesomplete": "^1.1.2",
"cookie": "^0.3.1",
"express": "^4.16.2",
"frappe-datatable": "^1.4.2",
"frappe-datatable": "^1.5.0",
"frappe-gantt": "^0.1.0",
"fuse.js": "^3.2.0",
"highlight.js": "^9.12.0",

View file

@ -1224,10 +1224,10 @@ forwarded@~0.1.2:
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
frappe-datatable@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.4.2.tgz#1b6dc401cf3aa72a9b6d12547d4f2aa0b6a95ab3"
integrity sha512-+V2+rD3tpciWmAzor6Mu/tl9nlgg0Y1VajNwWKkM5q0degmSVyS9moC5IzmlmgPogBWlYF6XOUC/xHKrHJij1A==
frappe-datatable@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.5.0.tgz#eea78a87e799876b71e58dbdc128fd9badb5e2c6"
integrity sha512-h9yP33UqRcEfcs5FVSFFUigya/KT5qFrB1vOqayhxqPoxdVH2pGKi+Qh/BO5KRNd6uVk8rVwXMhA8A9TU+2uEg==
dependencies:
hyperlist "^1.0.0-beta"
lodash "^4.17.5"