seperate function for sending confirmation
This commit is contained in:
parent
4d3dc87a1a
commit
d1ee962d4b
@ -42,20 +42,21 @@ class Appointment(Document):
|
|||||||
# Set status to unverified
|
# Set status to unverified
|
||||||
self.status = 'Unverified'
|
self.status = 'Unverified'
|
||||||
# Send email to confirm
|
# Send email to confirm
|
||||||
verify_url = self._get_verify_url()
|
|
||||||
template = 'confirm_appointment'
|
|
||||||
args = {
|
|
||||||
"link":verify_url,
|
|
||||||
"site_url":frappe.utils.get_url(),
|
|
||||||
"full_name":self.customer_name,
|
|
||||||
}
|
|
||||||
frappe.sendmail(recipients=[self.customer_email],
|
|
||||||
template=template,
|
|
||||||
args=args,
|
|
||||||
subject=_('Appointment Confirmation'))
|
|
||||||
frappe.msgprint(
|
|
||||||
'Please check your email to confirm the appointment')
|
|
||||||
|
|
||||||
|
def send_confirmation_email()
|
||||||
|
verify_url = self._get_verify_url()
|
||||||
|
template = 'confirm_appointment'
|
||||||
|
args = {
|
||||||
|
"link":verify_url,
|
||||||
|
"site_url":frappe.utils.get_url(),
|
||||||
|
"full_name":self.customer_name,
|
||||||
|
}
|
||||||
|
frappe.sendmail(recipients=[self.customer_email],
|
||||||
|
template=template,
|
||||||
|
args=args,
|
||||||
|
subject=_('Appointment Confirmation'))
|
||||||
|
frappe.msgprint(
|
||||||
|
'Please check your email to confirm the appointment')
|
||||||
|
|
||||||
def on_change(self):
|
def on_change(self):
|
||||||
# Sync Calendar
|
# Sync Calendar
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user