mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
[rename] [fix] merge related fixes
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes import _, msgprint
|
||||
|
||||
from webnotes.utils import cstr
|
||||
from webnotes.model.doc import Document
|
||||
@@ -288,6 +289,9 @@ class DocType:
|
||||
and value=%s""", self.doc.name)
|
||||
|
||||
def on_rename(self,newdn,olddn, merge=False):
|
||||
if merge:
|
||||
msgprint(_("Sorry. Companies cannot be merged"), raise_exception=True)
|
||||
|
||||
webnotes.conn.sql("""update `tabCompany` set company_name=%s
|
||||
where name=%s""", (newdn, olddn))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user