patch: rename crm note to fcrm note
This commit is contained in:
parent
6988614a4e
commit
8f05d76f9e
@ -1,6 +1,7 @@
|
||||
[pre_model_sync]
|
||||
# Patches added in this section will be executed before doctypes are migrated
|
||||
# Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations
|
||||
crm.patches.v1_0.rename_crm_note_to_fcrm_note
|
||||
|
||||
[post_model_sync]
|
||||
# Patches added in this section will be executed after doctypes are migrated
|
||||
|
||||
13
crm/patches/v1_0/rename_crm_note_to_fcrm_note.py
Normal file
13
crm/patches/v1_0/rename_crm_note_to_fcrm_note.py
Normal file
@ -0,0 +1,13 @@
|
||||
import frappe
|
||||
from frappe.model.rename_doc import rename_doc
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("DocType", "FCRM Note"):
|
||||
return
|
||||
|
||||
frappe.flags.ignore_route_conflict_validation = True
|
||||
rename_doc("DocType", "CRM Note", "FCRM Note")
|
||||
frappe.flags.ignore_route_conflict_validation = False
|
||||
|
||||
frappe.reload_doctype("FCRM Note", force=True)
|
||||
Loading…
x
Reference in New Issue
Block a user