ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Unable to change Company Name



Hi, I’m trying to update our company name by doing:
1- Company List
2- Open the Company
3- Menu -> Rename
4- ‘Some Cie Name’ -> Rename

But I’m getting this error:

Traceback (most recent call last):
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 61, in application
    response = frappe.handler.handle()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 56, in execute_cmd
    return, **frappe.form_dict)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 1019, in call
    return fn(*args, **newargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 47, in rename_doc
    update_link_field_values(link_fields, old, new, doctype)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 205, in update_link_field_values
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 260, in save
    return self._save(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 313, in _save
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 905, in run_post_save_methods
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 772, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 1048, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 1031, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 766, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/setup/doctype/global_defaults/", line 30, in on_update
    frappe.db.set_default(key, self.get(keydict[key], ''))
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 780, in set_default
    frappe.defaults.set_default(key, val, parent, parenttype)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 134, in set_default
    add_default(key, value, parent)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 147, in add_default
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 211, in insert
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 593, in _set_defaults
    new_doc = frappe.new_doc(self.doctype, as_dict=True)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 655, in new_doc
    return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 20, in get_new_doc
    frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 41, in make_new_doc
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/", line 51, in set_user_and_static_default_values
    user_permissions = get_user_permissions()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/user_permission/", line 73, in get_user_permissions
    decendants = frappe.db.get_descendants(perm.allow, perm.for_value)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/", line 970, in get_descendants
    lft, rgt = self.get_value(doctype, name, ('lft', 'rgt'))
TypeError: 'NoneType' object is not iterable

Does anyone have a clue on what is hapening here?



This is a permission issue. Assuming your on latest Erpnext (v11.1.10), try logging in administrator and try again.

I have just changed the name and it works.



I’m logged as Admin, but the versions are :
ERPNext: v11.1.3 (staging)
Frappe Framework: v11.1.3 (staging)


Is there a reason your on staging and not on master?