Try ERPNext Buy Support Partners Foundation

Profit and Loss Statement

Dashboard of profit and loss statement not showing on accounting screen.
Giving an message Start Year and End Year are mandatory.
Please Suggest.

1 Like

No one can help you without screen shot and complete information of what you have done that is causing this issue.

1 Like

Even I am facing the same error soon after fresh installation of version-13
Javascript log reads. account module is clicked.

  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 64, in application
    response = frappe.api.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 58, in handle
    return frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 30, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 70, in execute_cmd
    return, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 1113, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 564, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/", line 227, in run
    result = generate_report_result(report, filters, user, custom_columns)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/", line 75, in generate_report_result
    res = report.execute_script_report(filters)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/", line 124, in execute_script_report
    res = self.execute_module(filters)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/", line 141, in execute_module
    return frappe.get_attr(method_name)(frappe._dict(filters))
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/profit_and_loss_statement/", line 11, in execute
    period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/", line 29, in get_period_list
    validate_fiscal_year(fiscal_year, from_fiscal_year, to_fiscal_year)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/", line 111, in validate_fiscal_year
    frappe.throw(_("Start Year and End Year are mandatory"))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 409, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 388, in msgprint
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 342, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Start Year and End Year are mandatory

Point being new user such as @gmmahajan will be clueless where to go and what to do to fix this. Error message needs to be more precise.

Have you checked?

@Suresh_Thakor Yups.
Looks like the error is from Profit and Loss Dashboard from pre-set dashboard.