Reinstalling with a company named “-”, I get this:
Traceback with variables (most recent call last):
File "apps/erpnext/erpnext/setup/demo.py", line 26, in setup_demo_data
make_transactions(company)
capture = <function capture at 0x712f3ba527a0>
company = '- (Demo)'
File "apps/erpnext/erpnext/setup/demo.py", line 116, in make_transactions
convert_order_to_invoices()
company = '- (Demo)'
FiscalYearError = <class 'erpnext.accounts.utils.FiscalYearError'>
start_date = datetime.date(2025, 1, 1)
doctype = 'sales_order'
data = '[\n {\n "conversion_rate": 1.0,\n "customer": "Grant Plastics Ltd.",\n "doctype": "Sales Order",\n "update_stock": 1,\n "disable_rounded_total": 1,\n "items": [\n {\n "doctype": "Sales Order Item",\n "item_code": "SKU004",\n "parentfield": "items",\n "qty": 20.0,\n "rate": 1000.0,\n "conversion_factor": 1\n }\n ]\n },\n {\n "conversion_rate": 1.0,\n "customer": "West View Software Ltd.",\n "doctype": "Sales Order",\n "update_stock": 1,\n "disable_rounded_total": 1,\n "items": [\n {\n "doctype": "Sales Order Item",\n "item_code": "SKU001",\n "parentfield": "items",\n "qty": 25.0,\n "rate": 800.0,\n "conversion_factor": 1\n },\n {\n "doctype":...
item = {'conversion_rate': 1.0, 'customer': 'Grant Plastics Ltd.', 'doctype': 'Sales Order', 'update_stock': 1, 'disable_rounded_total': 1, 'items': [{'doctype': 'Sales Order Item', 'item_code': 'SKU008', 'parentfield': 'items', 'qty': 20.0, 'rate': 500.0, 'conversion_factor': 1}, {'doctype': 'Sales Order Item', 'item_code': 'SKU009', 'parentfield': 'items', 'qty': 40.0, 'rate': 300.0, 'conversion_factor': 1}, {'doctype': 'Sales Order Item', 'item_code': 'SKU010', 'parentfield': 'items', 'qty': 50.0, 'rate': 900.0, 'conversion_factor': 1}], 'company': '- (Demo)', 'set_posting_time': 1, 'transaction_date': datetime.date(2025, 11, 26), 'schedule_date': datetime.date(2025, 11, 26), 'delivery_date': datetime.date(2025, 11, 26), 'set_warehouse': 'Goods In Transit - -D'}
File "apps/erpnext/erpnext/setup/demo.py", line 167, in convert_order_to_invoices
invoice.submit()
document = 'Sales Order'
i = 0
order = {'name': 'SAL-ORD-2025-00005', 'transaction_date': datetime.date(2025, 11, 26)}
invoice = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
payment = <PaymentEntry: doctype=Payment Entry ACC-PAY-2025-00003 docstatus=1>
File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
return func(*args, **kwargs)
args = (<SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>,)
kwargs = {}
apply_condition = <function whitelist.<locals>.innerfn.<locals>.<lambda> at 0x712f43ae4d60>
func = <function Document.submit at 0x712f43ae4cc0>
File "apps/frappe/frappe/model/document.py", line 123, in wrapper
return func(self, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
func = <function Document.submit at 0x712f43ae4c20>
File "apps/frappe/frappe/model/document.py", line 1183, in submit
return self._submit()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
File "apps/frappe/frappe/model/document.py", line 1165, in _submit
return self.save()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
File "apps/frappe/frappe/model/document.py", line 123, in wrapper
return func(self, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
func = <function Document.save at 0x712f43adb060>
File "apps/frappe/frappe/model/document.py", line 448, in save
return self._save(*args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
File "apps/frappe/frappe/model/document.py", line 123, in wrapper
return func(self, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
func = <function Document._save at 0x712f43adb1a0>
File "apps/frappe/frappe/model/document.py", line 471, in _save
return self.insert()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
ignore_permissions = None
ignore_version = None
File "apps/frappe/frappe/model/document.py", line 123, in wrapper
return func(self, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
func = <function Document.insert at 0x712f43adae80>
File "apps/frappe/frappe/model/document.py", line 399, in insert
self.run_before_save_methods()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
ignore_permissions = None
ignore_links = None
ignore_if_duplicate = False
ignore_mandatory = None
set_name = None
set_child_names = True
File "apps/frappe/frappe/model/document.py", line 1250, in run_before_save_methods
self.run_method("validate")
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
File "apps/frappe/frappe/model/document.py", line 1095, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
method = 'validate'
args = ()
kwargs = {}
fn = <function Document.run_method.<locals>.fn at 0x712f3a3e9d00>
File "apps/frappe/frappe/model/document.py", line 1483, in composer
return composed(self, method, *args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
hooks = [<function validate_accounting_period_on_doc_save at 0x712f41d72480>, <function apply at 0x712f3b9bb560>, <function check_for_running_deletion_job at 0x712f3b9d9260>]
method = 'validate'
doc_events = {'*': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type', 'frappe.core.doctype.permission_log.permission_log.make_perm_log'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ...
handler = 'erpnext.setup.doctype.transaction_deletion_record.transaction_deletion_record.check_for_running_deletion_job'
composed = <function Document.hook.<locals>.compose.<locals>.runner at 0x712f3a3d8a40>
compose = <function Document.hook.<locals>.compose at 0x712f3a3eb1a0>
f = <function Document.run_method.<locals>.fn at 0x712f3a3e9d00>
File "apps/frappe/frappe/model/document.py", line 1461, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
method = 'validate'
args = ()
kwargs = {}
add_to_return_value = <function Document.hook.<locals>.add_to_return_value at 0x712f3a3eae80>
fn = <function Document.run_method.<locals>.fn at 0x712f3a3e9d00>
hooks = (<function validate_accounting_period_on_doc_save at 0x712f41d72480>, <function apply at 0x712f3b9bb560>, <function check_for_running_deletion_job at 0x712f3b9d9260>)
File "apps/frappe/frappe/model/document.py", line 1092, in fn
return method_object(*args, **kwargs)
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
args = ()
kwargs = {}
method_object = <bound method SalesInvoice.validate of <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>>
method = 'validate'
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 293, in validate
self.validate_accounts()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
__class__ = <class 'erpnext.accounts.doctype.sales_invoice.sales_invoice.SalesInvoice'>
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 350, in validate_accounts
self.validate_income_account()
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 382, in validate_income_account
validate_account_head(item.idx, item.income_account, self.company, _("Income"))
self = <SalesInvoice: doctype=Sales Invoice ACC-SINV-2025-00001 docstatus=1>
item = <SalesInvoiceItem: doctype=Sales Invoice Item hiqdp9sjdf docstatus=1 parent=ACC-SINV-2025-00001>
File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 2814, in validate_account_head
frappe.throw(
idx = 1
account = None
company = '- (Demo)'
context = 'Income'
File "apps/frappe/frappe/__init__.py", line 587, in throw
msgprint(
msg = 'Row 1: The Income Account <strong>None</strong> does not belong to the company <strong>- (Demo)</strong>'
exc = <class 'frappe.exceptions.ValidationError'>
title = 'Invalid Account'
is_minimizable = False
wide = False
as_list = False
primary_action = None
File "apps/frappe/frappe/__init__.py", line 548, in msgprint
_raise_exception()
msg = 'Row 1: The Income Account None does not belong to the company - (Demo)'
title = 'Invalid Account'
raise_exception = <class 'frappe.exceptions.ValidationError'>
as_table = False
as_list = False
indicator = 'red'
alert = False
primary_action = None
is_minimizable = False
wide = False
realtime = False
_raise_exception = <function msgprint.<locals>._raise_exception at 0x712f3a3d87c0>
inspect = <module 'inspect' from '/home/frappe/.pyenv/versions/3.11.6/lib/python3.11/inspect.py'>
out = {'message': 'Row 1: The Income Account <strong>None</strong> does not belong to the company <strong>- (Demo)</strong>', 'title': 'Invalid Account', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': 'a4adc84b3e5facc16de35c77a31b34d2734c9361e2cabbc5377fd6fb'}
File "apps/frappe/frappe/__init__.py", line 499, in _raise_exception
raise exc
exc = ValidationError('Row 1: The Income Account None does not belong to the company - (Demo)')
inspect = <module 'inspect' from '/home/frappe/.pyenv/versions/3.11.6/lib/python3.11/inspect.py'>
msg = 'Row 1: The Income Account None does not belong to the company - (Demo)'
out = {'message': 'Row 1: The Income Account <strong>None</strong> does not belong to the company <strong>- (Demo)</strong>', 'title': 'Invalid Account', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': 'a4adc84b3e5facc16de35c77a31b34d2734c9361e2cabbc5377fd6fb'}
raise_exception = <class 'frappe.exceptions.ValidationError'>
frappe.exceptions.ValidationError: Row 1: The Income Account None does not belong to the company - (Demo)
related to my provious post about having demo data.
Using Frappe+ERPNext 15-develop (v16)