def validate(self): self.validate_reference() if not self.user: self.user = frappe.session.user if not self.subject: self.subject = strip_html((self.content or "")[:141]) if not self.sent_or_received: self.seen = 1 self.sent_or_received = "Sent" self.set_status() self.set_sender_full_name() validate_email(self) set_timeline_doc(self)
def validate(self): self.set_status() set_timeline_doc(self)