mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
[rename] [fix] merge should be passed to on_rename method of controller for further processing
This commit is contained in:
@@ -272,7 +272,7 @@ class DocType(DocListController):
|
||||
from webnotes.webutils import clear_cache
|
||||
clear_cache(self.doc.page_name)
|
||||
|
||||
def on_rename(self,newdn,olddn):
|
||||
def on_rename(self,newdn,olddn, merge=False):
|
||||
webnotes.conn.sql("update tabItem set item_code = %s where name = %s", (newdn, olddn))
|
||||
if self.doc.page_name:
|
||||
from webnotes.webutils import clear_cache
|
||||
|
||||
@@ -117,7 +117,7 @@ class DocType(StockController):
|
||||
self.make_stock_ledger_entry(1)
|
||||
self.make_gl_entries()
|
||||
|
||||
def on_rename(self, new, old):
|
||||
def on_rename(self, new, old, merge=False):
|
||||
"""rename serial_no text fields"""
|
||||
for dt in webnotes.conn.sql("""select parent from tabDocField
|
||||
where fieldname='serial_no' and fieldtype='Text'"""):
|
||||
|
||||
Reference in New Issue
Block a user