mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-25 09:38:31 +00:00
on rename of company set company default_value
This commit is contained in:
@@ -248,4 +248,7 @@ class DocType:
|
||||
# on rename
|
||||
# ---------
|
||||
def on_rename(self,newdn,olddn):
|
||||
sql("update `tabCompany` set company_name = '%s' where name = '%s'" %(newdn,olddn))
|
||||
sql("update `tabCompany` set company_name = '%s' where name = '%s'" %(newdn,olddn))
|
||||
sql("update `tabSingles` set value = %s where doctype='Manage Account' and field = 'default_company' and value = %s", (newdn, olddn))
|
||||
if get_defaults('company') == olddn:
|
||||
set_default('company', newdn)
|
||||
|
||||
Reference in New Issue
Block a user