Skip to content

Commit 836d335

Browse files
committed
[MIG] helpdesk_mgmt_activity: Migration to 19.0
1 parent 7e00093 commit 836d335

4 files changed

Lines changed: 27 additions & 25 deletions

File tree

helpdesk_mgmt_activity/README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Helpdesk Management Activity
1111
!! This file is generated by oca-gen-addon-readme !!
1212
!! changes will be overwritten. !!
1313
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14-
!! source digest: sha256:f3e85a0e500d4b7ffa6e6212a7e159cc08c69fbb5ae776e0c9be0e9ec404c873
14+
!! source digest: sha256:43cad50035bccdae49efdf78ef385a3f79b80017ccea9d8ac7709b7beeffa612
1515
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1616
1717
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -21,13 +21,13 @@ Helpdesk Management Activity
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github
24-
:target: https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_activity
24+
:target: https://github.com/OCA/helpdesk/tree/19.0/helpdesk_mgmt_activity
2525
:alt: OCA/helpdesk
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_mgmt_activity
27+
:target: https://translation.odoo-community.org/projects/helpdesk-19-0/helpdesk-19-0-helpdesk_mgmt_activity
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -88,8 +88,8 @@ To Configure Ticket's Stage on Activity State*\*
8888

8989
|Team view|
9090

91-
.. |Settings view| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/settings.png
92-
.. |Team view| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/team.png
91+
.. |Settings view| image:: https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/settings.png
92+
.. |Team view| image:: https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/team.png
9393

9494
Usage
9595
=====
@@ -113,15 +113,15 @@ Usage
113113
created in the related model
114114
- If an activity is Done, the Ticket moves to the pre-defined stage
115115

116-
.. |Helpdesk Activity Fields| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/helpdesk_activity_fields.png
116+
.. |Helpdesk Activity Fields| image:: https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/helpdesk_activity_fields.png
117117

118118
Bug Tracker
119119
===========
120120

121121
Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/issues>`_.
122122
In case of trouble, please check there if your issue has already been reported.
123123
If you spotted it first, help us to smash it by providing a detailed and welcomed
124-
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_activity%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
124+
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_activity%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
125125

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

@@ -156,6 +156,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
156156
mission is to support the collaborative development of Odoo features and
157157
promote its widespread use.
158158

159-
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_activity>`_ project on GitHub.
159+
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/19.0/helpdesk_mgmt_activity>`_ project on GitHub.
160160

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

helpdesk_mgmt_activity/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Helpdesk Management Activity",
66
"summary": "Create Activities for Odoo records from the Helpdesk",
7-
"version": "18.0.1.0.0",
7+
"version": "19.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "Cetmix OÜ, Odoo Community Association (OCA)",
1010
"website": "https://github.com/OCA/helpdesk",

helpdesk_mgmt_activity/models/helpdesk_ticket.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
import ast
55

6-
from odoo import _, api, fields, models
6+
from odoo import api, fields, models
7+
from odoo.exceptions import UserError
78

89

910
class HelpdeskTicket(models.Model):
@@ -118,15 +119,15 @@ def set_next_stage(self):
118119
def _check_activity_values(self):
119120
"""Check activity values for helpdesk ticket"""
120121
if not self.can_create_activity:
121-
raise models.UserError(_("You cannot create activity!"))
122+
raise UserError(self.env._("You cannot create activity!"))
122123
if not (self.res_id and self.res_model):
123-
raise models.UserError(_("Source Record is not set!"))
124+
raise UserError(self.env._("Source Record is not set!"))
124125
if not self.source_activity_type_id:
125-
raise models.UserError(_("Activity Type is not set!"))
126+
raise UserError(self.env._("Activity Type is not set!"))
126127
if not self.date_deadline:
127-
raise models.UserError(_("Date Deadline is not set!"))
128+
raise UserError(self.env._("Date Deadline is not set!"))
128129
if not self.assigned_user_id:
129-
raise models.UserError(_("Assigned User is not set!"))
130+
raise UserError(self.env._("Assigned User is not set!"))
130131

131132
def perform_action(self):
132133
"""Perform action for ticket"""
@@ -140,17 +141,18 @@ def perform_action(self):
140141
note=self.description,
141142
date_deadline=self.date_deadline,
142143
activity_type_id=self.source_activity_type_id.id,
144+
user_id=self.assigned_user_id.id,
143145
ticket_id=self.id,
144146
)
145147
self.set_next_stage()
146148
except Exception as e:
147-
raise models.UserError from e
149+
raise UserError from e
148150
return {
149151
"type": "ir.actions.client",
150152
"tag": "display_notification",
151153
"params": {
152154
"type": "success",
153-
"message": _("Activity has been created!"),
155+
"message": self.env._("Activity has been created!"),
154156
"next": {"type": "ir.actions.act_window_close"},
155157
},
156158
}

helpdesk_mgmt_activity/static/description/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ <h1>Helpdesk Management Activity</h1>
372372
!! This file is generated by oca-gen-addon-readme !!
373373
!! changes will be overwritten. !!
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375-
!! source digest: sha256:f3e85a0e500d4b7ffa6e6212a7e159cc08c69fbb5ae776e0c9be0e9ec404c873
375+
!! source digest: sha256:43cad50035bccdae49efdf78ef385a3f79b80017ccea9d8ac7709b7beeffa612
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_activity"><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-18-0/helpdesk-18-0-helpdesk_mgmt_activity"><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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/19.0/helpdesk_mgmt_activity"><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-19-0/helpdesk-19-0-helpdesk_mgmt_activity"><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=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>The module adds the following features:</p>
379379
<ul class="simple">
380380
<li>Link a ticket to an Odoo model record</li>
@@ -430,7 +430,7 @@ <h3><a class="toc-backref" href="#toc-entry-3"><strong>To Configure Available Od
430430
<li>Go to Helpdesk–&gt;Configuration–&gt;Settings</li>
431431
<li>In the Available Models field add models available for a Helpdesk</li>
432432
</ul>
433-
<p><img alt="Settings view" src="https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/settings.png" /></p>
433+
<p><img alt="Settings view" src="https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/settings.png" /></p>
434434
</div>
435435
<div class="section" id="to-configure-ticket-s-stage-on-activity-state">
436436
<h3><a class="toc-backref" href="#toc-entry-4">To Configure Ticket’s Stage on Activity State**</a></h3>
@@ -441,7 +441,7 @@ <h3><a class="toc-backref" href="#toc-entry-4">To Configure Ticket’s Stage on
441441
<li>Select the “Done Activity Stage” to move the ticket when the activity
442442
is done</li>
443443
</ul>
444-
<p><img alt="Team view" src="https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/team.png" /></p>
444+
<p><img alt="Team view" src="https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/team.png" /></p>
445445
</div>
446446
</div>
447447
<div class="section" id="usage">
@@ -458,7 +458,7 @@ <h3><a class="toc-backref" href="#toc-entry-6"><strong>Go to Helpdesk module</st
458458
</ul>
459459
</li>
460460
</ul>
461-
<p><img alt="Helpdesk Activity Fields" src="https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt_activity/static/img/helpdesk_activity_fields.png" /></p>
461+
<p><img alt="Helpdesk Activity Fields" src="https://raw.githubusercontent.com/OCA/helpdesk/19.0/helpdesk_mgmt_activity/static/img/helpdesk_activity_fields.png" /></p>
462462
<ul class="simple">
463463
<li>Enter the Description</li>
464464
<li>Click the “Perform Action” button</li>
@@ -473,7 +473,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h2>
473473
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/helpdesk/issues">GitHub Issues</a>.
474474
In case of trouble, please check there if your issue has already been reported.
475475
If you spotted it first, help us to smash it by providing a detailed and welcomed
476-
<a class="reference external" href="https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_activity%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
476+
<a class="reference external" href="https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_activity%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
477477
<p>Do not contact contributors directly about support or help with technical issues.</p>
478478
</div>
479479
<div class="section" id="credits">
@@ -505,7 +505,7 @@ <h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
505505
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
506506
mission is to support the collaborative development of Odoo features and
507507
promote its widespread use.</p>
508-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_activity">OCA/helpdesk</a> project on GitHub.</p>
508+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/helpdesk/tree/19.0/helpdesk_mgmt_activity">OCA/helpdesk</a> project on GitHub.</p>
509509
<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>
510510
</div>
511511
</div>

0 commit comments

Comments
 (0)