mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
[rename] [fix] merge should be passed to on_rename method of controller for further processing
This commit is contained in:
@@ -168,7 +168,7 @@ class DocType(TransactionBase):
|
||||
self.delete_supplier_communication()
|
||||
self.delete_supplier_account()
|
||||
|
||||
def on_rename(self, new, old):
|
||||
def on_rename(self, new, old, merge=False):
|
||||
#update supplier_name if not naming series
|
||||
if webnotes.defaults.get_global_default('supp_master_name') == 'Supplier Name':
|
||||
update_fields = [
|
||||
@@ -186,7 +186,7 @@ class DocType(TransactionBase):
|
||||
for account in webnotes.conn.sql("""select name, account_name from
|
||||
tabAccount where master_name=%s and master_type='Supplier'""", old, as_dict=1):
|
||||
if account.account_name != new:
|
||||
webnotes.rename_doc("Account", account.name, new)
|
||||
webnotes.rename_doc("Account", account.name, new, merge=merge)
|
||||
|
||||
#update master_name in doctype account
|
||||
webnotes.conn.sql("""update `tabAccount` set master_name = %s,
|
||||
|
||||
Reference in New Issue
Block a user