[rename] [fix] merge should be passed to on_rename method of controller for further processing

This commit is contained in:
Anand Doshi
2013-05-09 12:45:18 +05:30
parent 4f8a81ca97
commit bddd5d9b0c
8 changed files with 73 additions and 9 deletions

View File

@@ -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

View File

@@ -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'"""):