Profit and Loss Statement

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

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/app.py", line 64, in application
    response = frappe.api.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 58, in handle
    return frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 30, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 70, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1113, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 564, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 227, in run
    result = generate_report_result(report, filters, user, custom_columns)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 75, in generate_report_result
    res = report.execute_script_report(filters)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py", line 124, in execute_script_report
    res = self.execute_module(filters)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py", 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/profit_and_loss_statement.py", 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/financial_statements.py", 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/financial_statements.py", line 111, in validate_fiscal_year
    frappe.throw(_("Start Year and End Year are mandatory"))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", 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/__init__.py", line 388, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", 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.

1 Like