Set warranty claim resolution date as today only if it is not set

This commit is contained in:
Nabin Hait 2016-10-05 16:43:13 +05:30
parent 2704a4a8fc
commit 33fafb7728

View File

@ -19,7 +19,7 @@ class WarrantyClaim(TransactionBase):
if session['user'] != 'Guest' and not self.customer:
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":
self.resolution_date = now_datetime()