From 80f333950b001efe72408fd0917d90e0f47ac601 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Mon, 16 Oct 2017 11:27:22 +0530 Subject: [PATCH] [minor] fixed AttributeError: 'GrossProfitGenerator' object has no attribute 'grouped_data' (#11195) --- erpnext/accounts/report/gross_profit/gross_profit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 07f6979c40c..78e3faab4ea 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -107,6 +107,8 @@ class GrossProfitGenerator(object): def process(self): self.grouped = {} + self.grouped_data = [] + for row in self.si_list: if self.skip_row(row, self.product_bundles): continue @@ -150,7 +152,6 @@ class GrossProfitGenerator(object): def get_average_rate_based_on_group_by(self): # sum buying / selling totals for group - self.grouped_data = [] for key in self.grouped.keys(): if self.filters.get("group_by") != "Invoice": for i, row in enumerate(self.grouped[key]):