[minor] [fix] removed contact_date_ref

This commit is contained in:
Anand Doshi 2013-10-09 15:01:17 +05:30
parent 17c8b940e3
commit 3d72addae0

View File

@ -98,9 +98,9 @@ class DocType(TransactionBase):
super(DocType, self).add_calendar_event(opts, force)
def set_last_contact_date(self):
if self.doc.contact_date:
if not self.doc.last_contact_date or (getdate(self.doc.last_contact_date) <= getdate(self.doc.contact_date)):
self.doc.last_contact_date = self.doc.contact_date
if self._prev.contact_date:
if not self.doc.last_contact_date or (getdate(self._prev.contact_date) <= getdate(self.doc.contact_date)):
self.doc.last_contact_date = self._prev.contact_date
else:
webnotes.throw(webnotes._("Contact Date Cannot be before Last Contact Date"))