ERPNext integration with Frappe CRM

Can you share the site name?

Hi,
I did a patch release now the issue is fixed. Just update CRM version to v1.23.4

1 Like

Its working :+1:
Shall check in detail

1 Like

Hi @shariquerik

I get this error message when trying to link to ERPNext, same site, self hosted

Error

/api/method/frappe.client.set_value ModuleNotFoundError: Internal Server Error

Any ideas?

version

image

Share full error, check Error log doctype or check console

error log doctype data :point_down:

Title
‘NoneType’ object has no attribute ‘name’
method
Error
Traceback with variables (most recent call last):
File “apps/frappe/frappe/app.py”, line 114, in application
response = frappe.api.handle(request)
request = <Request ‘https://sitename/api/method/frappe.client.set_value’ [POST]>
response = None
rollback = True
e = AttributeError(“‘NoneType’ object has no attribute ‘name’”)
File “apps/frappe/frappe/api/init.py”, line 49, in handle
data = endpoint(**arguments)
request = <Request ‘https://sitename/api/method/frappe.client.set_value’ [POST]>
endpoint = <function handle_rpc_call at 0x7fad1aaf8160>
arguments = {‘method’: ‘frappe.client.set_value’}
File “apps/frappe/frappe/api/v1.py”, line 36, in handle_rpc_call
return frappe.handler.handle()
method = ‘frappe.client.set_value’
frappe = <module ‘frappe’ from ‘apps/frappe/frappe/init.py’>
File “apps/frappe/frappe/handler.py”, line 49, in handle
data = execute_cmd(cmd)
cmd = ‘frappe.client.set_value’
data = None
File “apps/frappe/frappe/handler.py”, line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
cmd = ‘frappe.client.set_value’
from_async = False
server_script = None
method = <function set_value at 0x7fad1aac0160>
File “apps/frappe/frappe/init.py”, line 1775, in call
return fn(*args, **newargs)
fn = <function set_value at 0x7fad1aac0160>
args = ()
kwargs = {‘doctype’: ‘CRM Deal’, ‘name’: ‘CRM-DEAL-2024-00001’, ‘fieldname’: ‘status’, ‘value’: ‘Won’, ‘cmd’: ‘frappe.client.set_value’}
newargs = {‘doctype’: ‘CRM Deal’, ‘name’: ‘CRM-DEAL-2024-00001’, ‘fieldname’: ‘status’, ‘value’: ‘Won’}
File “apps/frappe/frappe/utils/typing_validations.py”, line 31, in wrapper
return func(*args, **kwargs)
args = ()
kwargs = {‘doctype’: ‘CRM Deal’, ‘name’: ‘CRM-DEAL-2024-00001’, ‘fieldname’: ‘status’, ‘value’: ‘Won’}
apply_condition = <function whitelist..innerfn.. at 0x7fad1aac00d0>
func = <function set_value at 0x7fad1aac0040>
File “apps/frappe/frappe/client.py”, line 188, in set_value
doc.save()
doctype = ‘CRM Deal’
name = ‘CRM-DEAL-2024-00001’
fieldname = ‘status’
value = ‘Won’
values = {‘status’: ‘Won’}
doc = <CRMDeal: CRM-DEAL-2024-00001>
File “apps/frappe/frappe/model/document.py”, line 337, in save
return self._save(*args, **kwargs)
self = <CRMDeal: CRM-DEAL-2024-00001>
args = ()
kwargs = {}
File “apps/frappe/frappe/model/document.py”, line 390, in _save
self.run_post_save_methods()
self = <CRMDeal: CRM-DEAL-2024-00001>
ignore_permissions = None
ignore_version = None
File “apps/frappe/frappe/model/document.py”, line 1128, in run_post_save_methods
self.run_method(“on_update”)
self = <CRMDeal: CRM-DEAL-2024-00001>
File “apps/frappe/frappe/model/document.py”, line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = <CRMDeal: CRM-DEAL-2024-00001>
args = ()
kwargs = {}
fn = <function Document.run_method..fn at 0x7fad16cd1240>
method = ‘on_update’
File “apps/frappe/frappe/model/document.py”, line 1322, in composer
return composed(self, method, args, **kwargs)
self = <CRMDeal: CRM-DEAL-2024-00001>
args = ()
kwargs = {}
hooks = [<function create_customer_in_erpnext at 0x7fad16e679a0>, <function clear_doctype_notifications at 0x7fad18baee60>, <function process_workflow_actions at 0x7fad16bf2d40>, <function attach_files_to_document at 0x7fad1b440ee0>, <function apply at 0x7fad16be8ca0>, <function update_due_date at 0x7fad16be8d30>, <function apply_permissions_for_non_standard_user_type at 0x7fad18bae680>]
method = ‘on_update’
doc_events = {'
': {‘on_update’: [‘frappe.desk.notifications.clear_doctype_notifications’, ‘frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions’, ‘frappe.core.doctype.file.utils.attach_files_to_document’, ‘frappe.automation.doctype.assignment_rule.assignment_rule.apply’, ‘frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date’, ‘frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type’], ‘after_rename’: [‘frappe.desk.notifications.clear_doctype_notifications’], ‘on_cancel’: [‘frappe.desk.notifications.clear_doctype_notifications’, ‘frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions’, ‘frappe.automation.doctype.assignment_rule.assignment_rule.apply’], ‘on_trash’: [‘frappe.desk.notifications.clear_doctype_notifications’, ‘frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions’], ‘on_update_after_submit’: ['frappe.workflow.doctype.workflow_action.workflow_action.process_w…
handler = ‘frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type’
composed = <function Document.hook..compose..runner at 0x7fad16cd1090>
compose = <function Document.hook..compose at 0x7fad16cd2200>
f = <function Document.run_method..fn at 0x7fad16cd1240>
File “apps/frappe/frappe/model/document.py”, line 1306, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
self = <CRMDeal: CRM-DEAL-2024-00001>
method = ‘on_update’
args = ()
kwargs = {}
f = <function create_customer_in_erpnext at 0x7fad16e679a0>
add_to_return_value = <function Document.hook..add_to_return_value at 0x7fad16cd24d0>
fn = <function Document.run_method..fn at 0x7fad16cd1240>
hooks = (<function create_customer_in_erpnext at 0x7fad16e679a0>, <function clear_doctype_notifications at 0x7fad18baee60>, <function process_workflow_actions at 0x7fad16bf2d40>, <function attach_files_to_document at 0x7fad1b440ee0>, <function apply at 0x7fad16be8ca0>, <function update_due_date at 0x7fad16be8d30>, <function apply_permissions_for_non_standard_user_type at 0x7fad18bae680>)
File “apps/crm/crm/fcrm/doctype/erpnext_crm_settings/erpnext_crm_settings.py”, line 199, in create_customer_in_erpnext
address = get_organization_address(doc.organization)
doc = <CRMDeal: CRM-DEAL-2024-00001>
method = ‘on_update’
erpnext_crm_settings = <ERPNextCRMSettings: ERPNext CRM Settings>
contacts = [{‘contact’: ‘Ash an’, ‘full_name’: ‘Ash an’, ‘email’: ‘as@gmail.com’, ‘mobile_no’: ‘0987654321’, ‘gender’: ‘Male’, ‘is_primary’: 1}]
File “apps/crm/crm/fcrm/doctype/erpnext_crm_settings/erpnext_crm_settings.py”, line 177, in get_organization_address
“name”: address.name,
organization = ‘asdf’
address = None
builtins.AttributeError: ‘NoneType’ object has no attribute ‘name’

Raised a fix and released in version 1.23.5

1 Like

Thank You So much,
Issue resolved.

1 Like

@olamide_shodunke Also make sure CRM version is v1.23.5 and ERPNext version is v15.36.1

1 Like

then it’s going to be a one time migration

Will there be an automated migration path?

Thanks, upgrading to v15.36.1 solved the issue.

I have started reviewing, looks interesting.

I was a bit dissapointed that on creating a quote, there is no reference to the quote in the CRM, even a tab that contains basic details of quotations and a link to open them in ERPNext will do.

Zero reference to quotations in the CRM is a no no. This gives an incomplete view of the deal/lead

2 Likes

A serious architectural question here. Why when developing a new app like CRM do you not also embed and replace the CRM functions in erpnext?

I know the challenge will be the doc type relationships but this would double the value of any new app that could also enhance erpnext.

  1. Create new app roadmap
  2. Could this app also completely replace a module in eprnext - Yes/No
  3. If yes, build app so you can be a separate app and replace core module in erpnexr.
  4. If not, just a stand alone app.

This approach will serve all community and customers.

Would love to hear from frappe on this!

2 Likes

In my opinion next priority after integrating with ERPNext should be integration of communication channels especially email.

1 Like

I’ve mentioned this before, but it’s baffling to me that the official app launched without ERPNext integration in the MVP.

Especially since Frappe said they were splitting up the monolith and putting ERPNext CRM on the back burner.

Experienced ERPNext users might find workarounds in the meantime, but for the average IT/admin assistant, it’s a challenge to figure out. This lack of clarity and integration absolutely deters companies from subscribing to their cloud service.

ERPNext and CRM are great, and Frappe is an amazing company. But their implementation strategies feel unclear, almost like there’s no plan.

Edit: Also, I’m happy to contribute to GitHub for simple features like UI tweaks, mobile support, or call logs. But when it comes to how CRM integrates with ERPNext? That’s where the Frappe team needs to take the lead and provide guidance. Which again, should have been at the very least roadmapped, if not released as a part of the MVP app when it became available on frappe cloud.

2 Likes

@olamide_shodunke where you able to resolve same site, self hosted ERPNext and Frappe CRM? Please share details. Thanks

I’m facing this issue. Please check if the integration has been completed.
Thanks You!

Hi everyone,

i have a issue with ERPNext v15 & Frappe CRM. If i mark a deal as won only the contact will be created but not the company name. Is it a bug? I have seen the issue on two erpnext sites.

Regards
Kevin

Hi Michelle,

Do we need to paid API service if the instance is not hosted frappe cloud for integrating Frappe CRM with ERPNext