Import local app source

This commit is contained in:
Codex
2026-04-23 10:43:49 +00:00
commit 283972860c
65 changed files with 7942 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# sunderer_app/sunderer_app/custom_user.py
import frappe
from frappe.core.doctype.user.user import User as CoreUser
class CustomUser(CoreUser):
def get_redirect_url(self):
"""自定义用户创建后的重定向URL"""
# 检查是否是新用户注册
if self.flags.in_insert and self.new_password:
# 新用户设置密码后,跳转到自定义页面
return "/custom-update-password"
# 默认行为
return super().get_redirect_url()
def after_user_creation(doc, method):
"""用户创建后触发的钩子"""
# 这里可以添加额外的用户初始化逻辑
pass