ERPNext: v8.x.x-beta (2b06633) (develop)
Frappe Framework: v8.x.x-beta (6e3708d) (develop)
Fiscal Year is set proper and is as default but error still persist.
Using ERPNext template.
Fiscal Year Setup


Error:

hello @addymuliady
is there any traceback?
Hi @tundebabzy
Traceback (most recent call last):
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/page/data_import_tool/importer.py", line 331, in upload
doc.submit()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 740, in submit
self._submit()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 729, in _submit
self.save()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 230, in save
return self._save(*args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 280, in _save
self.run_post_save_methods()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 792, in run_post_save_methods
self.run_method("on_submit")
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 891, in composer
return composed(self, method, *args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 874, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 61, in on_submit
self.update_stock_ledger()
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 410, in update_stock_ledger
"incoming_rate": flt(d.valuation_rate)
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 247, in get_sl_entries
'fiscal_year': get_fiscal_year(self.posting_date, company=self.company)[0],
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/utils.py", line 19, in get_fiscal_year
return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/utils.py", line 75, in get_fiscal_years
raise FiscalYearError, error_msg
FiscalYearError: Date 11-06-2017 not in any active Fiscal Year.
Hi @addymuliady , Posting Date is a required field when importing stock entry. Please ensure that you have entered it in the excel sheet.
Hi @sagarvora ,
Yeap that works! Thanks a lot!
Maybe the data import tool should specify posting date as mandatory?
Maybe the data import tool should specify posting date as mandatory?
Yes. Will open an issue and PR concerning this ASAP
Yes. Will open an issue and PR concerning this ASAP
No need for this as 9349 already takes care of the situation
@addymuliady posting date will be automatically picked up if it is not specified. (see #9349)
thanks for reporting this issue, closing.