feat(crm_settings): auto-update crm sync settings on frappe crm install and uninstall

(cherry picked from commit c86aa2d6fe)
This commit is contained in:
diptanilsaha
2026-07-01 03:52:08 +05:30
committed by Mergify
parent dfe4d5ab73
commit cb2a930a32
3 changed files with 42 additions and 0 deletions

View File

@@ -432,3 +432,19 @@ DEFAULT_ROLE_PROFILES = {
"Purchase Manager",
],
}
def after_app_install(app_name=None):
if app_name == "crm":
from erpnext.crm.frappe_crm_api import remove_allowed_users_on_crm_install
remove_allowed_users_on_crm_install()
def after_app_uninstall(app_name=None):
if app_name == "crm":
from erpnext.crm.frappe_crm_api import disable_frappe_crm_data_synchronization_on_crm_uninstall
disable_frappe_crm_data_synchronization_on_crm_uninstall()
frappe.db.commit() # nosemgrep