Skip to content

Commit

Permalink
Merge PR #508 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 2, 2023
2 parents 7d054ad + c74bfe7 commit ed35abe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helpdesk_mgmt/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def _prepare_submit_ticket_vals(self, **kw):
"partner_id": request.env.user.partner_id.id,
"partner_name": request.env.user.partner_id.name,
"partner_email": request.env.user.partner_id.email,
# Need to set stage_id so that the _track_template() method is called
# and the mail is sent automatically if applicable
"stage_id": request.env["helpdesk.ticket"].default_get(["stage_id"])[
"stage_id"
],
}
if company.helpdesk_mgmt_portal_select_team:
team = (
Expand Down
2 changes: 2 additions & 0 deletions helpdesk_mgmt/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ def _track_template(self, tracking):
res["stage_id"] = (
ticket.stage_id.mail_template_id,
{
# Need to set mass_mail so that the email will always be sent
"composition_mode": "mass_mail",
"auto_delete_message": True,
"subtype_id": self.env["ir.model.data"]._xmlid_to_res_id(
"mail.mt_note"
Expand Down

0 comments on commit ed35abe

Please sign in to comment.