Browse Source

May 19: [FIX] Bug Fixed 'odoo_website_helpdesk'

pull/346/merge
Cybrosys Technologies 1 month ago
parent
commit
0815f7c9c0
  1. 2
      odoo_website_helpdesk/__manifest__.py
  2. 14
      odoo_website_helpdesk/controller/website_form.py
  3. 13
      odoo_website_helpdesk/doc/RELEASE_NOTES.md
  4. 2
      odoo_website_helpdesk/static/description/index.html

2
odoo_website_helpdesk/__manifest__.py

@ -21,7 +21,7 @@
################################################################################ ################################################################################
{ {
'name': "Website Helpdesk Management", 'name': "Website Helpdesk Management",
'version': '18.0.1.0.1', 'version': '18.0.1.0.2',
'category': 'Website', 'category': 'Website',
'summary': """The website allows for the creation of tickets, which can 'summary': """The website allows for the creation of tickets, which can
then be controlled from the backend.""", then be controlled from the backend.""",

14
odoo_website_helpdesk/controller/website_form.py

@ -103,8 +103,20 @@ class WebsiteFormInherit(WebsiteForm):
'ticket_type_id': kwargs.get('ticket_type_id'), 'ticket_type_id': kwargs.get('ticket_type_id'),
'category_id': kwargs.get('category'), 'category_id': kwargs.get('category'),
} }
ticket_id = request.env['ticket.helpdesk'].sudo().create(rec_val) ticket_id = request.env['ticket.helpdesk'].sudo().create(rec_val)
if ticket_id and partner_create.email:
request.env['mail.mail'].sudo().create({
'subject': 'Your Ticket Has Been Created',
'body_html': f"<p>Hello {partner_create.name},</p><p>Your ticket <strong>{ticket_id.name}</strong> with the subject <strong>{ticket_id.subject}</strong> has been successfully submitted. Our support team will contact you soon.</p> <p>Thank You.</p>",
'email_to': partner_create.email,
'email_from': request.env.user.email or 'support@example.com',
}).send()
ticket_id.message_post(
body="A confirmation email regarding the ticket creation has been sent to the customer.",
subject="Ticket Confirmation Email",
message_type='email',
subtype_xmlid="mail.mt_comment",
)
request.session['ticket_number'] = ticket_id.name request.session['ticket_number'] = ticket_id.name
request.session['ticket_id'] = ticket_id.id request.session['ticket_id'] = ticket_id.id
model_record = request.env['ir.model'].sudo().search( model_record = request.env['ir.model'].sudo().search(

13
odoo_website_helpdesk/doc/RELEASE_NOTES.md

@ -10,3 +10,16 @@
#### Version 18.0.1.0.1 #### Version 18.0.1.0.1
##### UPDT ##### UPDT
-A new contact record is created upon form submission. -A new contact record is created upon form submission.
#### 13.05.2025
#### Version 18.0.1.0.2
##### UPDT
-A confirmation email will be sent to the customer upon ticket creation.

2
odoo_website_helpdesk/static/description/index.html

@ -910,6 +910,8 @@ Website Ticket Creation
<div class="col-md-12 mb-4"> <div class="col-md-12 mb-4">
<p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:var(--text-color-light)">Then you may see the ticket's Reference Code in the Thank You page that appears when the helpdesk ticket is generated. <p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:var(--text-color-light)">Then you may see the ticket's Reference Code in the Thank You page that appears when the helpdesk ticket is generated.
</p> </p>
<p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:var(--text-color-light)">A confirmation email will be sent to the customer upon ticket creation.
</p>
</div> </div>
<div class="col-md-12 text-center"> <div class="col-md-12 text-center">
<div class="d-inline-block p-3 shadow-sm" <div class="d-inline-block p-3 shadow-sm"

Loading…
Cancel
Save