I need to quickly import 1,000 Employee records into my ERPNext/Frappe system. The data is for a Bank, meaning the hierarchy and access roles are critical.
I am planning to use the Data Import Tool (CSV). I’m seeking the most performant and reliable strategy for the following challenges:
Hierarchy (Reports To Field):
For 1,000 employees with complex tiers (Staff → Manager → Executive), is it better to map the reports_to data directly in the CSV?
OR is it faster/safer to run a simple Python script via bench console after the import to update the reports_to links in batches?
User Creation & Roles:
What is the quickest way to batch create User accounts for all 1,000 employees once the import is successful?
After users are created, what is the best method (Bulk Update or SQL) to assign specific User Roles (e.g., Branch Manager Role) based on their Designation?
Any advice on optimizing this process would be highly appreciated. Thank you!
Traceback (most recent call last):
File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 153, in import_data
doc = self.process_doc(doc)
File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 255, in process_doc
return self.insert_record(doc)
File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 262, in insert_record
new_doc.update(doc)
File "apps/frappe/frappe/model/base_document.py", line 264, in update
self.__dict__.update(key_val for key_val in d.items() if key_val[0] not in RESERVED_KEYWORDS)
AttributeError: 'NoneType' object has no attribute 'items'
I did already make branch department and all, but this keeps coming to that error.