style: Linting fixes

This commit is contained in:
Aditya Hase 2019-02-06 13:08:51 +05:30
parent 1e0f9a2882
commit 59fc039c77
2 changed files with 42 additions and 43 deletions

View File

@ -1,44 +1,44 @@
frappe.dashboard_chart_sources["Account Balance Timeline"] = { frappe.dashboard_chart_sources["Account Balance Timeline"] = {
method_path: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get", method_path: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get",
filters: [ filters: [
{ {
fieldname: "company", fieldname: "company",
label: __("Company"), label: __("Company"),
fieldtype: "Link", fieldtype: "Link",
options: "Company", options: "Company",
default: frappe.defaults.get_user_default("Company"), default: frappe.defaults.get_user_default("Company"),
reqd: 1 reqd: 1
}, },
{ {
fieldname: "account", fieldname: "account",
label: __("Account"), label: __("Account"),
fieldtype: "Link", fieldtype: "Link",
options: "Account", options: "Account",
reqd: 1 reqd: 1
}, },
{ {
fieldname: "timespan", fieldname: "timespan",
label: __("Period"), label: __("Period"),
fieldtype: "Select", fieldtype: "Select",
options: [ options: [
{value: "Last Year", label: __("Last Year")}, {value: "Last Year", label: __("Last Year")},
{value: "Last Quarter", label: __("Last Quarter")}, {value: "Last Quarter", label: __("Last Quarter")},
{value: "Last Month", label: __("Last Month")}, {value: "Last Month", label: __("Last Month")},
{value: "Last Week", label: __("Last Week")} {value: "Last Week", label: __("Last Week")}
], ],
reqd: 1 reqd: 1
}, },
{ {
fieldname: "timegrain", fieldname: "timegrain",
label: __("Periodicity"), label: __("Periodicity"),
fieldtype: "Select", fieldtype: "Select",
options: [ options: [
{value: "Quarterly", label: __("Quarterly")}, {value: "Quarterly", label: __("Quarterly")},
{value: "Monthly", label: __("Monthly")}, {value: "Monthly", label: __("Monthly")},
{value: "Weekly", label: __("Weekly")}, {value: "Weekly", label: __("Weekly")},
{value: "Daily", label: __("Daily")} {value: "Daily", label: __("Daily")}
], ],
reqd: 1 reqd: 1
}, },
] ]
}; };

View File

@ -4,7 +4,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from itertools import groupby from itertools import groupby
from operator import itemgetter from operator import itemgetter
import json
import frappe import frappe
from frappe.core.page.dashboard.dashboard import cache_source from frappe.core.page.dashboard.dashboard import cache_source
from frappe.utils import add_to_date, date_diff, getdate, nowdate from frappe.utils import add_to_date, date_diff, getdate, nowdate