1
0
forked from test/crm

fix: renaming fix and removed CRM User code

(cherry picked from commit cf1fce3dc0334ec728798f47cc2537726f4dc6ea)
This commit is contained in:
Shariq Ansari 2025-06-23 13:11:55 +05:30 committed by Mergify
parent a485d8eb6e
commit f0b295a907
4 changed files with 3 additions and 11 deletions

View File

@ -4,7 +4,7 @@ import frappe
@frappe.whitelist()
def add_existing_users(users, role="Sales User"):
"""
Add existing users to the CRM User doctype.
Add existing users to the CRM by assigning them a role (Sales User or Sales Manager).
:param users: List of user names to be added
"""
frappe.only_for(["System Manager", "Sales Manager"])

View File

@ -52,14 +52,6 @@ class CRMInvitation(Document):
self.accepted_at = frappe.utils.now()
self.save(ignore_permissions=True)
# create CRM User record
if not frappe.db.exists("CRM User", {"user": user.name}):
crm_user = frappe.get_doc(
doctype="CRM User",
user=user.name,
)
crm_user.insert(ignore_permissions=True)
def update_module_in_user(self, user, module):
block_modules = frappe.get_all(
"Module Def",

View File

@ -529,7 +529,7 @@ const articles = ref([
{ name: 'profile', title: __('Profile') },
{ name: 'custom-branding', title: __('Custom branding') },
{ name: 'home-actions', title: __('Home actions') },
{ name: 'invite-agent', title: __('Invite agent') },
{ name: 'invite-users', title: __('Invite users') },
],
},
{

View File

@ -101,7 +101,7 @@
</div>
</template>
<script setup>
import ChangePasswordModal from '@/components/Settings/ChangePasswordModal.vue'
import ChangePasswordModal from '@/components/Modals/ChangePasswordModal.vue'
import CameraIcon from '@/components/Icons/CameraIcon.vue'
import { usersStore } from '@/stores/users'
import { validateIsImageFile } from '@/utils'