From 3d72addae03b5010942eceff761f688a9a221613 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 9 Oct 2013 15:01:17 +0530 Subject: [PATCH] [minor] [fix] removed contact_date_ref --- selling/doctype/opportunity/opportunity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py index dfb124b448..eaabd0836d 100644 --- a/selling/doctype/opportunity/opportunity.py +++ b/selling/doctype/opportunity/opportunity.py @@ -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"))