mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Set warranty claim resolution date as today only if it is not set
This commit is contained in:
@@ -19,7 +19,7 @@ class WarrantyClaim(TransactionBase):
|
|||||||
if session['user'] != 'Guest' and not self.customer:
|
if session['user'] != 'Guest' and not self.customer:
|
||||||
frappe.throw(_("Customer is required"))
|
frappe.throw(_("Customer is required"))
|
||||||
|
|
||||||
if self.status=="Closed" and \
|
if self.status=="Closed" and not self.resolution_date and \
|
||||||
frappe.db.get_value("Warranty Claim", self.name, "status")!="Closed":
|
frappe.db.get_value("Warranty Claim", self.name, "status")!="Closed":
|
||||||
self.resolution_date = now_datetime()
|
self.resolution_date = now_datetime()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user