diff --git a/helpdesk_ticket_partner_response/README.rst b/helpdesk_ticket_partner_response/README.rst index 4dfe313aa1..655f82f1cb 100644 --- a/helpdesk_ticket_partner_response/README.rst +++ b/helpdesk_ticket_partner_response/README.rst @@ -7,7 +7,7 @@ Helpdesk Ticket Partner Response !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ba0afeaf6a51755decd7ebf7af7aaa74ea7961d668a33ea358408f3452caa97b + !! source digest: sha256:c5907d9a9d20c4cce131b0414eeb303d5710df2707cf758380e06b8cc71a4e17 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -76,7 +76,7 @@ Contributors [APSL-Nagarro](https://apsl.tech): -- Antoni Marroig +- Antoni Marroig Maintainers ----------- diff --git a/helpdesk_ticket_partner_response/__manifest__.py b/helpdesk_ticket_partner_response/__manifest__.py index 45799cf017..3b8abac668 100644 --- a/helpdesk_ticket_partner_response/__manifest__.py +++ b/helpdesk_ticket_partner_response/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Helpdesk Ticket Partner Response", "summary": "Change ticket stage when partner response", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "category": "Helpdesk", "website": "https://github.com/OCA/helpdesk", "author": "Antoni Marroig, APSL-Nagarro, Odoo Community Association (OCA)", diff --git a/helpdesk_ticket_partner_response/models/__init__.py b/helpdesk_ticket_partner_response/models/__init__.py index a68d1884da..4ee2a1e429 100644 --- a/helpdesk_ticket_partner_response/models/__init__.py +++ b/helpdesk_ticket_partner_response/models/__init__.py @@ -1,3 +1,4 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import helpdesk_ticket_team +from . import mail_thread diff --git a/helpdesk_ticket_partner_response/models/mail_thread.py b/helpdesk_ticket_partner_response/models/mail_thread.py new file mode 100644 index 0000000000..41354c85f0 --- /dev/null +++ b/helpdesk_ticket_partner_response/models/mail_thread.py @@ -0,0 +1,27 @@ +from odoo import api, models + + +class MailThread(models.AbstractModel): + _inherit = "mail.thread" + + @api.model + def _message_route_process(self, message, message_dict, routes): + self.change_status_ticket_from_portal(routes) + return super()._message_route_process(message, message_dict, routes) + + def change_status_ticket_from_portal(self, routes): + if routes and routes[0][0] == "helpdesk.ticket": + ticket_id = routes[0][1] + ticket = self.env["helpdesk.ticket"].sudo().browse(int(ticket_id)) + partner_id = ( + self.env["res.users"] + .search([("id", "=", routes[0][3])], limit=1) + .partner_id.id + ) + if ( + ticket + and partner_id == ticket.partner_id.id + and ticket.team_id.autoupdate_ticket_stage + and ticket.stage_id in ticket.team_id.autopupdate_src_stage_ids + ): + ticket.stage_id = ticket.team_id.autopupdate_dest_stage_id.id diff --git a/helpdesk_ticket_partner_response/static/description/index.html b/helpdesk_ticket_partner_response/static/description/index.html index f92d18ab8d..2bb8d1fe1b 100644 --- a/helpdesk_ticket_partner_response/static/description/index.html +++ b/helpdesk_ticket_partner_response/static/description/index.html @@ -1,124 +1,444 @@ -
-
-
-

Module name

-

This module was written to extend the functionality of ... to support ... and allow you to ...

-
-
-
- -
-
-
-

Installation

-
-
-

To install this module, you need to: -

    -
  • ...
  • -
-

-
-
-
- - - -
-
-
-
- -
-
-
-

Configuration

-
-
-

To configure this module, you need to: -

    -
  • ...
  • -
-

-
-
-
- - - -
-
-
-
- -
-
-
-

Usage

-
-
-

To use this module, you need to: -

    -
  • ...
  • -
-

-

For further information, please visit: -

-

-
-
-
- - - -
-
-
-
- -
-
-
-

Known issues / Roadmap

-
-
-

-

    -
  • ...
  • -
-

-
-
-
- - - -
-
-
-
- -
-
-
-

Credits

-
-
-

Contributors

- -
-
-

Maintainer

-

- This module is maintained by the OCA.
- OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
- To contribute to this module, please visit http://odoo-community.org.
- -

-
-
-
+ + + + + +Helpdesk Ticket Partner Response + + + +
+

Helpdesk Ticket Partner Response

+ + +

Beta License: AGPL-3 OCA/helpdesk Translate me on Weblate Try me on Runboat

+

Autoupdate ticket stage when a partner posts a message on the ticket +from the portal or by sending an email.

+

Table of contents

+ +
+

Configuration

+

Set ticket source and destination stages from where if a message by the +partner is posted autopdation have to be triggered. To setup this +configuration you have to go to Helpdesk > Settings > Teams > Autoupdate +ticket stage

+
+
+

Usage

+

This module adds the option from helpdesk team to automate the ticket +stage update when a partner posts a message on the same ticket. This is +useful when exists an specific stage for the tickets that his last +update is answer by the partner.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Antoni Marroig
  • +
  • APSL-Nagarro
  • +
+
+
+

Contributors

+

[APSL-Nagarro](https://apsl.tech):

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

peluko00

+

This module is part of the OCA/helpdesk project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +