Skip to content

Commit

Permalink
[MIG] helpdesk_mgmt_rating: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aromera authored and carolinafernandez-tecnativa committed Mar 27, 2024
1 parent 690a31b commit 5c3b561
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 32 deletions.
12 changes: 6 additions & 6 deletions helpdesk_mgmt_rating/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Helpdesk Management Rating
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1826b768bc05758de41a1da4fcaaa7478662cb03f006eccbff30603d5d79da9f
!! source digest: sha256:47af3639d9e2335c965d3aaed97d98ec6fec4321d12cf0b9c9ee5c4021bf8672
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Helpdesk Management Rating
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github
:target: https://github.com/OCA/helpdesk/tree/15.0/helpdesk_mgmt_rating
:target: https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_rating
:alt: OCA/helpdesk
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/helpdesk-15-0/helpdesk-15-0-helpdesk_mgmt_rating
:target: https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt_rating
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -64,7 +64,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/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 <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_rating%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_rating%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand Down Expand Up @@ -105,6 +105,6 @@ 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.

This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/15.0/helpdesk_mgmt_rating>`_ project on GitHub.
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_rating>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion helpdesk_mgmt_rating/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This module allows customer to rate the assistance received
on a ticket.
""",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Domatix, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/helpdesk",
Expand Down
12 changes: 5 additions & 7 deletions helpdesk_mgmt_rating/data/helpdesk_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@
<field name="model_id" ref="helpdesk_mgmt.model_helpdesk_ticket" />
<field
name="email_from"
>{{object.rating_get_rated_partner_id().email_formatted}}</field>
<field
name="email_to"
>{{object.rating_get_partner_id().email_formatted}}</field>
>{{object._rating_get_operator().email_formatted}}</field>
<field name="email_to">{{object._rating_get_partner().email_formatted}}</field>
<field
name="subject"
>Satisfaction Survey of the ticket {{object.number}} - {{object.name}}</field>
<field name="partner_to">{{object.rating_get_partner_id().id}}</field>
<field name="partner_to">{{object._rating_get_partner().id}}</field>
<field name="auto_delete" eval="True" />
<field name="body_html" type="html">
<div>
<t t-set="access_token" t-value="object.rating_get_access_token()" />
<t t-set="access_token" t-value="object._rating_get_access_token()" />
<table
border="0"
cellpadding="0"
Expand All @@ -39,7 +37,7 @@
><t t-out="object.number" /> - <t
t-out="object.name"
/></strong>"assigned to <strong><t
t-out="object.rating_get_rated_partner_id().name"
t-out="object._rating_get_operator().name"
/></strong>.</p>
<p
>We appreciate your feedback. It helps us to improve continuously.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<?xml version='1.0' encoding='utf-8' ?>
<odoo>
<record id="rating_ticket_email_template" model="mail.template">
<field name="name">Helpdesk Ticket: Rating Request</field>
<field name="model_id" ref="helpdesk_mgmt.model_helpdesk_ticket" />
<field
name="email_from"
>{{object.rating_get_rated_partner_id().email_formatted}}</field>
<field
name="email_to"
>{{object.rating_get_partner_id().email_formatted}}</field>
>{{object._rating_get_operator().email_formatted}}</field>
<field name="email_to">{{object._rating_get_partner().email_formatted}}</field>
<field
name="subject"
>Satisfaction Survey of the ticket {{object.number}} - {{object.name}}</field>
<field name="partner_to">{{object.rating_get_partner_id().id}}</field>
<field name="partner_to">{{object._rating_get_partner().id}}</field>
<field name="auto_delete" eval="True" />
<field name="body_html" type="html">
<div>
<t t-set="access_token" t-value="object.rating_get_access_token()" />
<t t-set="access_token" t-value="object._rating_get_access_token()" />
<table
border="0"
cellpadding="0"
Expand All @@ -30,7 +31,7 @@
><t t-out="object.number" /> - <t
t-out="object.name"
/></strong>"assigned to <strong><t
t-out="object.rating_get_rated_partner_id().name"
t-out="object._rating_get_operator().name"
/></strong>.</p>
<p
>We appreciate your feedback. It helps us to improve continuously.</p>
Expand Down
4 changes: 2 additions & 2 deletions helpdesk_mgmt_rating/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def rating_apply(self, rate, token=None, feedback=None, subtype_xmlid=None):
subtype_xmlid="helpdesk_mgmt_rating.mt_ticket_rating",
)

def rating_get_partner_id(self):
res = super().rating_get_partner_id()
def _rating_get_partner(self):
res = super()._rating_get_partner()
if not res and self.partner_id:
return self.partner_id
return res
Expand Down
8 changes: 4 additions & 4 deletions helpdesk_mgmt_rating/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Helpdesk Management Rating</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1826b768bc05758de41a1da4fcaaa7478662cb03f006eccbff30603d5d79da9f
!! source digest: sha256:47af3639d9e2335c965d3aaed97d98ec6fec4321d12cf0b9c9ee5c4021bf8672
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/15.0/helpdesk_mgmt_rating"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-15-0/helpdesk-15-0-helpdesk_mgmt_rating"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_rating"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt_rating"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds the possibility to rate the assistance received through helpdesk
tickets.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -420,7 +420,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/helpdesk/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_rating%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_rating%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -456,7 +456,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/helpdesk/tree/15.0/helpdesk_mgmt_rating">OCA/helpdesk</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_rating">OCA/helpdesk</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions helpdesk_mgmt_rating/views/helpdesk_ticket_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
<field name="name">ticket.view.form: Rating status</field>
<field name="model">helpdesk.ticket</field>
<field name="inherit_id" ref="helpdesk_mgmt.ticket_view_form" />
<field
name="groups_id"
eval="[(4, ref('helpdesk_mgmt.group_helpdesk_manager'))]"
/>
<field name="arch" type="xml">
<xpath expr="//group[@name='main']/group[2]" position="after">
<group>
<field name="rating_status" widget="radio" />
<field
name="rating_status"
widget="radio"
groups="helpdesk_mgmt.group_helpdesk_manager"
/>
</group>
</xpath>
</field>
Expand Down

0 comments on commit 5c3b561

Please sign in to comment.