chore!: remove activity log feeds (#33294)

- This contains little to no information and practically no one uses this.
- Also causes a lot of problem by adding way too many feeds in activity
  log to the point where activity page doesn't even load.
This commit is contained in:
Ankush Menat 2022-12-12 15:14:30 +05:30 committed by GitHub
parent 593626f502
commit 915e0347b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 0 additions and 40 deletions

View File

@ -34,9 +34,6 @@ class JournalEntry(AccountsController):
def __init__(self, *args, **kwargs):
super(JournalEntry, self).__init__(*args, **kwargs)
def get_feed(self):
return self.voucher_type
def validate(self):
if self.voucher_type == "Opening Entry":
self.is_opening = "Yes"

View File

@ -20,9 +20,6 @@ from erpnext.utilities.transaction_base import TransactionBase
class Supplier(TransactionBase):
def get_feed(self):
return self.supplier_name
def onload(self):
"""Load address and contacts in `__onload`"""
load_address_and_contact(self)

View File

@ -25,10 +25,6 @@ class BuyingController(SubcontractingController):
def __setup__(self):
self.flags.ignore_permlevel_for_fields = ["buying_price_list", "price_list_currency"]
def get_feed(self):
if self.get("supplier_name"):
return _("From {0} | {1} {2}").format(self.supplier_name, self.currency, self.grand_total)
def validate(self):
super(BuyingController, self).validate()
if getattr(self, "supplier", None) and not self.supplier_name:

View File

@ -19,9 +19,6 @@ class SellingController(StockController):
def __setup__(self):
self.flags.ignore_permlevel_for_fields = ["selling_price_list", "price_list_currency"]
def get_feed(self):
return _("To {0} | {1} {2}").format(self.customer_name, self.currency, self.grand_total)
def onload(self):
super(SellingController, self).onload()
if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):

View File

@ -14,9 +14,6 @@ from erpnext.crm.utils import CRMNote, copy_comments, link_communications, link_
class Lead(SellingController, CRMNote):
def get_feed(self):
return "{0}: {1}".format(_(self.status), self.lead_name)
def onload(self):
customer = frappe.db.get_value("Customer", {"lead_name": self.name})
self.get("__onload").is_customer = customer

View File

@ -10,9 +10,6 @@ from erpnext.utilities.transaction_base import TransactionBase
class MaintenanceVisit(TransactionBase):
def get_feed(self):
return _("To {0}").format(self.customer_name)
def validate_serial_no(self):
for d in self.get("purposes"):
if d.serial_no and not frappe.db.exists("Serial No", d.serial_no):

View File

@ -15,9 +15,6 @@ from erpnext.setup.doctype.holiday_list.holiday_list import is_holiday
class Project(Document):
def get_feed(self):
return "{0}: {1}".format(_(self.status), frappe.safe_decode(self.project_name))
def onload(self):
self.set_onload(
"activity_summary",

View File

@ -20,9 +20,6 @@ class CircularReferenceError(frappe.ValidationError):
class Task(NestedSet):
nsm_parent_field = "parent_task"
def get_feed(self):
return "{0}: {1}".format(_(self.status), self.subject)
def get_customer_details(self):
cust = frappe.db.sql("select customer_name from `tabCustomer` where name=%s", self.customer)
if cust:

View File

@ -27,9 +27,6 @@ from erpnext.utilities.transaction_base import TransactionBase
class Customer(TransactionBase):
def get_feed(self):
return self.customer_name
def onload(self):
"""Load address and contacts in `__onload`"""
load_address_and_contact(self)

View File

@ -22,9 +22,6 @@ form_grid_templates = {"items": "templates/form_grid/material_request_grid.html"
class MaterialRequest(BuyingController):
def get_feed(self):
return
def check_if_already_pulled(self):
pass

View File

@ -83,9 +83,6 @@ class StockEntry(StockController):
}
)
def get_feed(self):
return self.stock_entry_type
def onload(self):
for item in self.get("items"):
item.update(get_bin_details(item.item_code, item.s_warehouse))

View File

@ -18,9 +18,6 @@ from frappe.utils.user import is_website_user
class Issue(Document):
def get_feed(self):
return "{0}: {1}".format(_(self.status), self.subject)
def validate(self):
if self.is_new() and self.via_customer_portal:
self.flags.create_communication = True

View File

@ -10,9 +10,6 @@ from erpnext.utilities.transaction_base import TransactionBase
class WarrantyClaim(TransactionBase):
def get_feed(self):
return _("{0}: From {1}").format(self.status, self.customer_name)
def validate(self):
if session["user"] != "Guest" and not self.customer:
frappe.throw(_("Customer is required"))