[FIX] helpdesk_request_type: corrected bug on attachments in new ticket form #1

Merged
mondot merged 1 commits from correct-bug-about-attachments into 16.0 2025-02-07 09:27:10 +00:00
mondot commented 2025-01-28 15:35:17 +00:00 (Migrated from github.com)

The param max_upload_sizewas missing when rendering helpdesk_mgmt.portal_create_ticket. Instead of added it, I've overloaded the response from helpdesk_mgmt create_new_ticket.

The param `max_upload_size`was missing when rendering `helpdesk_mgmt.portal_create_ticket`. Instead of added it, I've overloaded the response from `helpdesk_mgmt` `create_new_ticket`.
mondot commented 2025-01-28 15:38:24 +00:00 (Migrated from github.com)

I wonder if it was on purpose that the behavior on categories was modified @stephansainleger.

Before my changes, we load all the active categories

        categories = http.request.env["helpdesk.ticket.category"].search(
            [("active", "=", True)]
        )

After my changes, the categories loaded are those linked to a company

        company = request.env.company
        category_model = http.request.env["helpdesk.ticket.category"]
        categories = category_model.with_company(company.id).search(
            [("active", "=", True)]
        )

Also, it seems helpdesk_portal_ticket_priority_form can now work alongside the module helpdesk_request_type (they both change the route /new/ticket)

I wonder if it was on purpose that the behavior on categories was modified @stephansainleger. Before my changes, we load all the active categories ```python categories = http.request.env["helpdesk.ticket.category"].search( [("active", "=", True)] ) ``` After my changes, the categories loaded are those linked to a company ```python company = request.env.company category_model = http.request.env["helpdesk.ticket.category"] categories = category_model.with_company(company.id).search( [("active", "=", True)] ) ``` Also, it seems `helpdesk_portal_ticket_priority_form` can now work alongside the module `helpdesk_request_type` (they both change the route `/new/ticket`)
stephansainleger (Migrated from github.com) approved these changes 2025-02-07 09:26:55 +00:00
stephansainleger (Migrated from github.com) left a comment

Local Test OK

Local Test OK
Sign in to join this conversation.
No description provided.