From c567e8e960f3321a461053c05590cf6f7188179b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 3 Feb 2015 17:55:52 +0530 Subject: [PATCH] [fix] analytics reports + remove print item tables #2667 --- .../accounts/page/financial_analytics/financial_analytics.js | 2 +- erpnext/buying/page/purchase_analytics/purchase_analytics.js | 2 +- erpnext/controllers/buying_controller.py | 5 ++--- erpnext/controllers/selling_controller.py | 5 ++--- erpnext/public/js/stock_analytics.js | 2 +- erpnext/support/page/support_analytics/support_analytics.js | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.js b/erpnext/accounts/page/financial_analytics/financial_analytics.js index 631af159bc..4e507113ae 100644 --- a/erpnext/accounts/page/financial_analytics/financial_analytics.js +++ b/erpnext/accounts/page/financial_analytics/financial_analytics.js @@ -49,7 +49,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ ], setup_columns: function() { var std_columns = [ - {id: "check", name: __("Plot"), field: "check", width: 30, + {id: "_check", name: __("Plot"), field: "_check", width: 30, formatter: this.check_formatter}, {id: "name", name: __("Account"), field: "name", width: 300, formatter: this.tree_formatter}, diff --git a/erpnext/buying/page/purchase_analytics/purchase_analytics.js b/erpnext/buying/page/purchase_analytics/purchase_analytics.js index 5ac7593bf5..33fb9b2f54 100644 --- a/erpnext/buying/page/purchase_analytics/purchase_analytics.js +++ b/erpnext/buying/page/purchase_analytics/purchase_analytics.js @@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ this.tree_grid = this.tree_grids[this.tree_type]; var std_columns = [ - {id: "check", name: __("Plot"), field: "check", width: 30, + {id: "_check", name: __("Plot"), field: "_check", width: 30, formatter: this.check_formatter}, {id: "name", name: this.tree_grid.label, field: "name", width: 300, formatter: this.tree_formatter}, diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 82da90eea2..1b0cda0299 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -15,9 +15,8 @@ from erpnext.controllers.stock_controller import StockController class BuyingController(StockController): def __setup__(self): if hasattr(self, "items"): - self.table_print_templates = { - "items": "templates/print_formats/includes/item_grid.html", - "taxes": "templates/print_formats/includes/taxes.html", + self.print_templates = { + "taxes": "templates/print_formats/includes/taxes.html" } def get_feed(self): diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 328894c702..89cac69765 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -13,9 +13,8 @@ from erpnext.controllers.stock_controller import StockController class SellingController(StockController): def __setup__(self): if hasattr(self, "items"): - self.table_print_templates = { - "items": "templates/print_formats/includes/item_grid.html", - "taxes": "templates/print_formats/includes/taxes.html", + self.print_templates = { + "taxes": "templates/print_formats/includes/taxes.html" } def get_feed(self): diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js index ef6633bcc4..f8aeba9f11 100644 --- a/erpnext/public/js/stock_analytics.js +++ b/erpnext/public/js/stock_analytics.js @@ -36,7 +36,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ }, setup_columns: function() { var std_columns = [ - {id: "check", name: __("Plot"), field: "check", width: 30, + {id: "_check", name: __("Plot"), field: "_check", width: 30, formatter: this.check_formatter}, {id: "name", name: __("Item"), field: "name", width: 300, formatter: this.tree_formatter}, diff --git a/erpnext/support/page/support_analytics/support_analytics.js b/erpnext/support/page/support_analytics/support_analytics.js index 8e0b10afd5..4ca15a25e6 100644 --- a/erpnext/support/page/support_analytics/support_analytics.js +++ b/erpnext/support/page/support_analytics/support_analytics.js @@ -37,7 +37,7 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ setup_columns: function() { var std_columns = [ - {id: "check", name: __("Plot"), field: "check", width: 30, + {id: "_check", name: __("Plot"), field: "_check", width: 30, formatter: this.check_formatter}, {id: "status", name: __("Status"), field: "status", width: 100}, ];