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
image

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/importer.py”, line 146, in import_data
doc = self.process_doc(doc)
File “apps/frappe/frappe/core/doctype/data_import/importer.py”, line 240, in process_doc
return self.insert_record(doc)
File “apps/frappe/frappe/core/doctype/data_import/importer.py”, line 259, in insert_record
new_doc.insert()
File “apps/frappe/frappe/model/document.py”, line 260, in insert
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1045, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 915, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1267, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1251, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “apps/nbpos/nbpos/nbpos/hooks/warehouse.py”, line 8, in validate_hub_manager
frappe.throw(_(“Already been used in some another warehouse.”))
File “apps/frappe/frappe/init.py”, line 538, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 506, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, 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.