mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
refactor(sales_order): Replace SQL with ORM in check_modified_date (#55205)
This commit is contained in:
@@ -593,8 +593,7 @@ class SalesOrder(SellingController):
|
||||
|
||||
def check_modified_date(self):
|
||||
mod_db = frappe.db.get_value("Sales Order", self.name, "modified")
|
||||
date_diff = frappe.db.sql(f"select TIMEDIFF('{mod_db}', '{cstr(self.modified)}')")
|
||||
if date_diff and date_diff[0][0]:
|
||||
if mod_db and cstr(mod_db) != cstr(self.modified):
|
||||
frappe.throw(_("{0} {1} has been modified. Please refresh.").format(self.doctype, self.name))
|
||||
|
||||
def update_status(self, status):
|
||||
|
||||
Reference in New Issue
Block a user