mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
[refactor] [frappe 5.0]
This commit is contained in:
@@ -12,6 +12,8 @@ from frappe.utils import today
|
||||
from erpnext.utilities.transaction_base import TransactionBase
|
||||
|
||||
class CustomerIssue(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:
|
||||
|
||||
@@ -8,6 +8,8 @@ from frappe import _
|
||||
from erpnext.utilities.transaction_base import TransactionBase
|
||||
|
||||
class MaintenanceVisit(TransactionBase):
|
||||
def get_feed(self):
|
||||
return _("To {0}").format(self.customer_name)
|
||||
|
||||
def get_item_details(self, item_code):
|
||||
return frappe.db.get_value("Item", item_code, ["item_name", "description"], as_dict=1)
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
from erpnext.utilities.transaction_base import TransactionBase
|
||||
from frappe.utils import now, extract_email_id
|
||||
|
||||
class SupportTicket(TransactionBase):
|
||||
def get_feed(self):
|
||||
return "{0}: {1}".format(_(self.status, self.subject))
|
||||
|
||||
def get_sender(self, comm):
|
||||
return frappe.db.get_value('Support Email Settings',None,'support_email')
|
||||
@@ -30,7 +33,7 @@ class SupportTicket(TransactionBase):
|
||||
self.set_lead_contact(self.raised_by)
|
||||
|
||||
if self.status == "Closed":
|
||||
from frappe.widgets.form.assign_to import clear
|
||||
from frappe.desk.form.assign_to import clear
|
||||
clear(self.doctype, self.name)
|
||||
|
||||
def set_lead_contact(self, email_id):
|
||||
|
||||
Reference in New Issue
Block a user