mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge branch 'production' of github.com:webnotes/erpnext into production
This commit is contained in:
@@ -3,6 +3,7 @@ import webnotes
|
||||
def execute():
|
||||
delete_doctypes()
|
||||
rename_module()
|
||||
rebuilt_exploded_bom()
|
||||
|
||||
def delete_doctypes():
|
||||
from webnotes.model import delete_doc
|
||||
@@ -14,17 +15,23 @@ def rename_module():
|
||||
webnotes.reload_doc("core", "doctype", "page")
|
||||
webnotes.reload_doc("core", "doctype", "module_def")
|
||||
|
||||
webnotes.rename_doc("Role", "Production User", "Manufacturing User")
|
||||
webnotes.rename_doc("Role", "Production Manager", "Manufacturing Manager")
|
||||
if webnotes.conn.exists("Role", "Production User"):
|
||||
webnotes.rename_doc("Role", "Production User", "Manufacturing User")
|
||||
if webnotes.conn.exists("Role", "Production Manager"):
|
||||
webnotes.rename_doc("Role", "Production Manager", "Manufacturing Manager")
|
||||
|
||||
if webnotes.conn.exists("Page", "manufacturing-home"):
|
||||
webnotes.delete_doc("Page", "production-home")
|
||||
else:
|
||||
webnotes.rename_doc("Page", "production-home", "manufacturing-home")
|
||||
|
||||
webnotes.rename_doc("Module Def", "Production", "Manufacturing")
|
||||
if webnotes.conn.exists("Module Def", "Production"):
|
||||
webnotes.rename_doc("Module Def", "Production", "Manufacturing")
|
||||
|
||||
webnotes.conn.set_global("modules_list",
|
||||
webnotes.conn.get_global('modules_list').replace("Production", "Manufacturing"))
|
||||
|
||||
|
||||
def rebuilt_exploded_bom():
|
||||
from webnotes.model.code import get_obj
|
||||
for bom in webnotes.conn.sql("""select name from `tabBOM` where docstatus < 2"""):
|
||||
get_obj("BOM", bom[0], with_children=1).on_update()
|
||||
|
||||
Reference in New Issue
Block a user