forked from alaguraj/odoo-testing-addons
Compare commits
3 Commits
2a8930f360
...
19527c1673
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19527c1673 | ||
|
|
d3cb5fdb7f | ||
|
|
2dff231653 |
@ -268,6 +268,28 @@ class TableReservationController(http.Controller):
|
|||||||
'end_time': end_time,
|
'end_time': end_time,
|
||||||
'state': 'confirmed' # Direct confirmation from website
|
'state': 'confirmed' # Direct confirmation from website
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Send Email
|
||||||
|
try:
|
||||||
|
mail_values = {
|
||||||
|
'subject': f"New Table Reservation: {customer_name}",
|
||||||
|
'body_html': f"""
|
||||||
|
<p>A new table reservation has been submitted successfully.</p>
|
||||||
|
<ul>
|
||||||
|
<li><b>Customer Name:</b> {customer_name}</li>
|
||||||
|
<li><b>Phone:</b> {phone}</li>
|
||||||
|
<li><b>Email:</b> {email}</li>
|
||||||
|
<li><b>Number of Guests:</b> {num_people}</li>
|
||||||
|
<li><b>Time:</b> {start_time_str}</li>
|
||||||
|
</ul>
|
||||||
|
""",
|
||||||
|
'email_to': 'alaguraj0361@gmail.com',
|
||||||
|
}
|
||||||
|
mail = request.env['mail.mail'].sudo().create(mail_values)
|
||||||
|
mail.send()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
return request.render("dine360_reservation.reservation_success_template", {
|
return request.render("dine360_reservation.reservation_success_template", {
|
||||||
'reservation': reservation,
|
'reservation': reservation,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -736,7 +736,7 @@ section h2.display-4 {
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #e9ecef;
|
background: #fecd4fd4;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
@ -745,7 +745,7 @@ section h2.display-4 {
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 50%;
|
// border-radius: 50%;
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user