Already been used in some another warehouse

I face a problem creating a warehouse. no matter the name I give to the intended warehouse the system throws the below error

I assure there is no warehouse with the same name (because it gives same error for any name). I suspected it maybe the “account” and left it blank. But same result.

ERP Next version 14 is installed and below component are available.

  • frappe
  • erpnext
  • healthcare
  • posawesome
  • nbpos

Open the console log and check for any errors. If there is a script applied, please remove it. This is the first time we have encountered this type of error.

As the second step I tried bulk upload. It sarted well, but didn’t work. The error was

Traceback (most recent call last):
File “apps/frappe/frappe/core/doctype/data_import/”, line 146, in import_data
doc = self.process_doc(doc)
File “apps/frappe/frappe/core/doctype/data_import/”, line 240, in process_doc
return self.insert_record(doc)
File “apps/frappe/frappe/core/doctype/data_import/”, line 259, in insert_record
File “apps/frappe/frappe/model/”, line 260, in insert
File “apps/frappe/frappe/model/”, line 1045, in run_before_save_methods
File “apps/frappe/frappe/model/”, line 915, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1267, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1251, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “apps/nbpos/nbpos/nbpos/hooks/”, line 8, in validate_hub_manager
frappe.throw(_(“Already been used in some another warehouse.”))
File “apps/frappe/frappe/”, line 538, in throw
File “apps/frappe/frappe/”, line 506, in msgprint
File “apps/frappe/frappe/”, line 452, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Already been used in some another warehouse.

this error is from your custom app, not from the erpnext.

check the method and solve it your own way.

to fix the original issue I have removed the custom app. Now I have another error.
" Field hub_manager is referring to non-existing doctype Hub Manager . Please delete the field from Account-hub_manager or add the required doctype."

Well, like it said, I removed custom field Account-hub_manager and then Warehouse-hub_manager. It looks like the problem solved.

Thanks you very much @NCP for the prompt reply. I’ll post here if there’s any other development related to this topic.