feat: remove old fixtures

This commit is contained in:
Shivam Mishra
2020-05-06 15:18:43 +05:30
parent a4567a446f
commit b2103f5470
5 changed files with 1 additions and 168 deletions

View File

@@ -485,8 +485,6 @@ def install_defaults(args=None):
# bank account same as a CoA entry
pass
add_dashboards()
# Now, with fixtures out of the way, onto concrete stuff
records = [
@@ -504,27 +502,6 @@ def install_defaults(args=None):
make_records(records)
def add_dashboards():
from erpnext.setup.setup_wizard.data.dashboard_charts import get_company_for_dashboards
if not get_company_for_dashboards():
return
from erpnext.setup.setup_wizard.data.dashboard_charts import get_default_dashboards
from frappe.modules.import_file import import_file_by_path
dashboard_data = get_default_dashboards()
# create account balance timeline before creating dashbaord charts
doctype = "dashboard_chart_source"
docname = "account_balance_timeline"
folder = os.path.dirname(frappe.get_module("erpnext.accounts").__file__)
doc_path = os.path.join(folder, doctype, docname, docname) + ".json"
import_file_by_path(doc_path, force=0, for_sync=True)
make_records(dashboard_data["Charts"])
make_records(dashboard_data["Dashboards"])
def get_fy_details(fy_start_date, fy_end_date):
start_year = getdate(fy_start_date).year