fix: refactored comments API. Depends on https://github.com/frappe/frappe/pull/6891
diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py
index 47e80d4..8349e47 100644
--- a/erpnext/selling/doctype/customer/test_customer.py
+++ b/erpnext/selling/doctype/customer/test_customer.py
@@ -117,8 +117,8 @@
def test_rename(self):
# delete communication linked to these 2 customers
for name in ("_Test Customer 1", "_Test Customer 1 Renamed"):
- frappe.db.sql("""delete from `tabCommunication`
- where communication_type='Comment' and reference_doctype=%s and reference_name=%s""",
+ frappe.db.sql("""delete from `tabComment`
+ where reference_doctype=%s and reference_name=%s""",
("Customer", name))
# add comments
@@ -132,8 +132,7 @@
self.assertFalse(frappe.db.exists("Customer", "_Test Customer 1"))
# test that comment gets linked to renamed doc
- self.assertEqual(frappe.db.get_value("Communication", {
- "communication_type": "Comment",
+ self.assertEqual(frappe.db.get_value("Comment", {
"reference_doctype": "Customer",
"reference_name": "_Test Customer 1 Renamed"
}), comment.name)
diff --git a/erpnext/setup/setup_wizard/operations/defaults_setup.py b/erpnext/setup/setup_wizard/operations/defaults_setup.py
index ff8dd75..6dd0fb1 100644
--- a/erpnext/setup/setup_wizard/operations/defaults_setup.py
+++ b/erpnext/setup/setup_wizard/operations/defaults_setup.py
@@ -5,7 +5,6 @@
import frappe
from frappe import _
from frappe.utils import cstr, getdate
-from frappe.core.doctype.communication.comment import add_info_comment
def set_default_settings(args):
# enable default currency
@@ -114,9 +113,7 @@
def create_feed_and_todo():
"""update Activity feed and create todo for creation of item, customer, vendor"""
- add_info_comment(**{
- "subject": _("ERPNext Setup Complete!")
- })
+ return
def get_fy_details(fy_start_date, fy_end_date):
start_year = getdate(fy_start_date).year