Browse Source

July 17: [FIX] Bug Fixed 'odoo_website_helpdesk'

16.0
Cybrosys Technologies 2 days ago
parent
commit
36d36b5879
  1. 2
      odoo_website_helpdesk/__manifest__.py
  2. 26
      odoo_website_helpdesk/controller/website.py
  3. 5
      odoo_website_helpdesk/doc/RELEASE_NOTES.md

2
odoo_website_helpdesk/__manifest__.py

@ -21,7 +21,7 @@
#############################################################################
{
'name': "Website Helpdesk Support Ticket Management",
'version': '16.0.3.0.2',
'version': '16.0.3.0.3',
'category': 'Website',
'summary': """Helpdesk Module for community""",
'description': 'Can create ticket from website also and can manage it from'

26
odoo_website_helpdesk/controller/website.py

@ -30,6 +30,7 @@ from odoo.addons.website.controllers.form import WebsiteForm
class HelpdeskProduct(http.Controller):
"""It controls the website products and return the product."""
@http.route('/product', auth='public', type='json')
def product(self):
"""Product control function"""
@ -45,6 +46,7 @@ class WebsiteFormInherit(WebsiteForm):
controller to display a list of tickets for the current user in their
portal, and overrides the website form controller's method for handling
form submissions to create a new help desk ticket instead."""
def _handle_website_form(self, model_name, **kwargs):
"""Website Help Desk Form"""
if model_name == 'help.ticket':
@ -56,12 +58,28 @@ class WebsiteFormInherit(WebsiteForm):
if rec == lowest_sequence:
lowest_stage_id = lowest_sequence
products = kwargs.get('product')
# Check if user is logged in and not public user
if request.env.user and request.env.user.id != request.env.ref(
'base.public_user').id:
partner_create = request.env.user.partner_id
else:
# Check if partner already exists with the same email
email = kwargs.get('email_from')
existing_partner = request.env['res.partner'].sudo().search([
('email', '=', email)
], limit=1)
if existing_partner:
partner_create = existing_partner
else:
# Create new partner only if it doesn't exist
partner_create = request.env['res.partner'].sudo().create({
'name':kwargs.get('customer_name'),
'company_name':kwargs.get('company'),
'phone':kwargs.get('phone'),
'email':kwargs.get('email_from')
'name': kwargs.get('customer_name'),
'company_name': kwargs.get('company'),
'phone': kwargs.get('phone'),
'email': kwargs.get('email_from')
})
if products:
splited_product = products.split(',')
product_list = [int(i) for i in splited_product]

5
odoo_website_helpdesk/doc/RELEASE_NOTES.md

@ -15,3 +15,8 @@
#### Version 16.0.3.0.2
##### UPDT
-A confirmation email will be sent to the customer upon ticket creation.
#### 14.07.2025
#### Version 16.0.3.0.3
##### FIX
- Tickets created was not visible for the user.

Loading…
Cancel
Save