[minor] grid report loading

This commit is contained in:
Anand Doshi 2015-02-17 19:53:23 +05:30
parent a6c361c00e
commit 8c0f05fbae
8 changed files with 22 additions and 12 deletions

View File

@ -1,8 +1,6 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['financial-analytics'].on_page_load = function(wrapper) { frappe.pages['financial-analytics'].on_page_load = function(wrapper) {
frappe.ui.make_app_page({ frappe.ui.make_app_page({
parent: wrapper, parent: wrapper,
@ -10,9 +8,11 @@ frappe.pages['financial-analytics'].on_page_load = function(wrapper) {
single_column: true single_column: true
}); });
erpnext.financial_analytics = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics'); erpnext.financial_analytics = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
frappe.add_breadcrumbs("Accounts") frappe.add_breadcrumbs("Accounts");
} };
frappe.require("assets/erpnext/js/account_tree_grid.js");
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [ filters: [

View File

@ -11,10 +11,11 @@ frappe.pages['purchase-analytics'].on_page_load = function(wrapper) {
new erpnext.PurchaseAnalytics(wrapper); new erpnext.PurchaseAnalytics(wrapper);
frappe.add_breadcrumbs("Buying") frappe.add_breadcrumbs("Buying");
} }
frappe.assets.views["Report"]();
erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
init: function(wrapper) { init: function(wrapper) {
this._super({ this._super({

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
frappe.assets.views["Report"]();
erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
init: function(wrapper, title) { init: function(wrapper, title) {
this._super({ this._super({

View File

@ -1,6 +1,8 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.assets.views["Report"]();
erpnext.StockGridReport = frappe.views.TreeGridReport.extend({ erpnext.StockGridReport = frappe.views.TreeGridReport.extend({
get_item_warehouse: function(warehouse, item) { get_item_warehouse: function(warehouse, item) {
if(!this.item_warehouse[item]) this.item_warehouse[item] = {}; if(!this.item_warehouse[item]) this.item_warehouse[item] = {};

View File

@ -12,7 +12,9 @@ frappe.pages['sales-analytics'].on_page_load = function(wrapper) {
frappe.add_breadcrumbs("Selling") frappe.add_breadcrumbs("Selling")
} };
frappe.assets.views["Report"]();
erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
init: function(wrapper) { init: function(wrapper) {

View File

@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.pages['stock-analytics'].on_page_load = function(wrapper) { frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
frappe.ui.make_app_page({ frappe.ui.make_app_page({
parent: wrapper, parent: wrapper,
title: __('Stock Analytics'), title: __('Stock Analytics'),
@ -13,7 +13,8 @@ frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
frappe.add_breadcrumbs("Stock") frappe.add_breadcrumbs("Stock")
}
frappe.require("assets/erpnext/js/stock_analytics.js"); };
frappe.assets.views["Report"]();
frappe.require("assets/erpnext/js/stock_analytics.js");

View File

@ -10,7 +10,7 @@ frappe.pages['stock-ledger'].on_page_load = function(wrapper) {
new erpnext.StockLedger(wrapper); new erpnext.StockLedger(wrapper);
frappe.add_breadcrumbs("Stock") frappe.add_breadcrumbs("Stock")
} };
frappe.require("assets/erpnext/js/stock_grid_report.js"); frappe.require("assets/erpnext/js/stock_grid_report.js");

View File

@ -15,6 +15,8 @@ frappe.pages['support-analytics'].on_page_load = function(wrapper) {
} }
frappe.assets.views["Report"]();
erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
init: function(wrapper) { init: function(wrapper) {
this._super({ this._super({