mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Add Ends-On field in the Lead doctype (#13147)
* add ends_on date in lead to be mapped with calendar event * set default ends_on to 1 hour from contact_time
This commit is contained in:
@@ -36,7 +36,8 @@ class TransactionBase(StatusUpdater):
|
||||
|
||||
def add_calendar_event(self, opts, force=False):
|
||||
if cstr(self.contact_by) != cstr(self._prev.contact_by) or \
|
||||
cstr(self.contact_date) != cstr(self._prev.contact_date) or force:
|
||||
cstr(self.contact_date) != cstr(self._prev.contact_date) or force or \
|
||||
(hasattr(self, "ends_on") and cstr(self.ends_on) != cstr(self._prev.ends_on)):
|
||||
|
||||
self.delete_events()
|
||||
self._add_calendar_event(opts)
|
||||
@@ -58,6 +59,7 @@ class TransactionBase(StatusUpdater):
|
||||
"subject": opts.subject,
|
||||
"description": opts.description,
|
||||
"starts_on": self.contact_date,
|
||||
"ends_on": opts.ends_on,
|
||||
"event_type": "Private",
|
||||
"ref_type": self.doctype,
|
||||
"ref_name": self.name
|
||||
|
||||
Reference in New Issue
Block a user