Skip to content

Commit

Permalink
[MIG] helpdesk_mgmt_fieldservice: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anusriNPS committed Sep 25, 2024
1 parent 34c9ae2 commit deb512d
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 50 deletions.
10 changes: 5 additions & 5 deletions helpdesk_mgmt_fieldservice/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Helpdesk Mgmt Fieldservice
: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:/OCA/helpdesk/tree/14.0/helpdesk_mgmt_fieldservice
:target: https:/OCA/helpdesk/tree/16.0/helpdesk_mgmt_fieldservice
:alt: OCA/helpdesk
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/helpdesk-14-0/helpdesk-14-0-helpdesk_mgmt_fieldservice
:target: https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt_fieldservice
: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=14.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 @@ -69,7 +69,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https:/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:/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_fieldservice%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https:/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_fieldservice%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 @@ -103,6 +103,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:/OCA/helpdesk/tree/14.0/helpdesk_mgmt_fieldservice>`_ project on GitHub.
This module is part of the `OCA/helpdesk <https:/OCA/helpdesk/tree/16.0/helpdesk_mgmt_fieldservice>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
8 changes: 6 additions & 2 deletions helpdesk_mgmt_fieldservice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Helpdesk Mgmt Fieldservice",
"summary": """
Create service orders from a ticket""",
"version": "14.0.1.1.2",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Open Source Integrators, "
"Escodoo, "
Expand All @@ -20,8 +20,12 @@
"views/helpdesk_ticket_views.xml",
"views/fsm_location_views.xml",
"views/fsm_order_views.xml",
"views/res_partner.xml",
"wizards/fsm_order_close_wizard.xml",
],
"assets": {
"web.assets_backend": [
"helpdesk_mgmt_fieldservice/static/src/scss/helpdesk_column.scss",
],
},
"demo": [],
}
1 change: 1 addition & 0 deletions helpdesk_mgmt_fieldservice/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
from . import fsm_location
from . import fsm_order
from . import helpdesk_ticket
from . import res_partner
2 changes: 1 addition & 1 deletion helpdesk_mgmt_fieldservice/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HelpdeskTicket(models.Model):
fsm_order_ids = fields.One2many("fsm.order", "ticket_id", string="Service Orders")
fsm_location_id = fields.Many2one("fsm.location", string="FSM Location")
all_orders_closed = fields.Boolean(compute="_compute_all_closed", store=True)
resolution = fields.Text(string="Resolution")
resolution = fields.Text()
# these fields are needed to obtain depreciation of onchange in v14
partner_domain = fields.Integer(compute="_compute_partner_domain")
all_partners = fields.Boolean(compute="_compute_partner_domain")
Expand Down
20 changes: 20 additions & 0 deletions helpdesk_mgmt_fieldservice/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from odoo import models


class ResPartner(models.Model):
_inherit = "res.partner"

def action_view_helpdesk_tickets(self):
# replacing context only when there are both the groups
if self.env.user.has_group(
"fieldservice.group_fsm_user_own"
) and self.env.user.has_group("helpdesk_mgmt.group_helpdesk_user_own"):
context = dict(self.env.context)
context.pop("search_default_open", None)
self = self.with_context(

Check warning on line 14 in helpdesk_mgmt_fieldservice/models/res_partner.py

View check run for this annotation

Codecov / codecov/patch

helpdesk_mgmt_fieldservice/models/res_partner.py#L12-L14

Added lines #L12 - L14 were not covered by tests
context,
default_partner_id=self.id,
default_fsm_location_id=self.service_location_id.id,
)
return super(ResPartner, self).action_view_helpdesk_tickets()
return super().action_view_helpdesk_tickets

Check warning on line 20 in helpdesk_mgmt_fieldservice/models/res_partner.py

View check run for this annotation

Codecov / codecov/patch

helpdesk_mgmt_fieldservice/models/res_partner.py#L19-L20

Added lines #L19 - L20 were not covered by tests
2 changes: 1 addition & 1 deletion helpdesk_mgmt_fieldservice/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_helpdesk_ticket_fsm_user,helpdesk.ticket.fsm.user,model_helpdesk_ticket,fieldservice.group_fsm_user,1,0,0,0
access_fsm_order_close_wizard,fsm.order.close.wizard,model_fsm_order_close_wizard,fieldservice.group_fsm_user,1,1,1.0
access_fsm_order_close_wizard,fsm.order.close.wizard,model_fsm_order_close_wizard,fieldservice.group_fsm_user,1,1,1,0
18 changes: 10 additions & 8 deletions helpdesk_mgmt_fieldservice/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Helpdesk Mgmt Fieldservice</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2298c9baf4289333d16aa846aca9176b09d8ebdd66361ded2aa009262544a9ee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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:/OCA/helpdesk/tree/14.0/helpdesk_mgmt_fieldservice"><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-14-0/helpdesk-14-0-helpdesk_mgmt_fieldservice"><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=14.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:/OCA/helpdesk/tree/16.0/helpdesk_mgmt_fieldservice"><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_fieldservice"><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 allows the helpdesk user to track the status of related service orders.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand Down Expand Up @@ -424,7 +424,7 @@ <h1><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https:/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:/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_fieldservice%0Aversion:%2014.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:/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_fieldservice%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 All @@ -448,11 +448,13 @@ <h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<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:/OCA/helpdesk/tree/14.0/helpdesk_mgmt_fieldservice">OCA/helpdesk</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https:/OCA/helpdesk/tree/16.0/helpdesk_mgmt_fieldservice">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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.tests.common import Form, SavepointCase
from odoo.tests.common import Form, TransactionCase


class TestHelpdeskTicketFSMOrder(SavepointCase):
class TestHelpdeskTicketFSMOrder(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
13 changes: 0 additions & 13 deletions helpdesk_mgmt_fieldservice/views/helpdesk_ticket_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<!-- pylint:disable=dangerous-view-replace-wo-priority -->
<odoo>
<template
id="shrink_tree_column"
name="helpdesk assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
href="/helpdesk_mgmt_fieldservice/static/src/scss/helpdesk_column.scss"
/>
</xpath>
</template>

<!-- Helpdesk Ticket Form View -->
<record id="helpdesk_ticket_view_service_request_form" model="ir.ui.view">
<field name="name">helpdesk.ticket.service.request.form</field>
Expand Down
17 changes: 0 additions & 17 deletions helpdesk_mgmt_fieldservice/views/res_partner.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FSMOrderCloseWizard(models.TransientModel):
_name = "fsm.order.close.wizard"
_description = "FSM Close - Option to Close Ticket"

resolution = fields.Text(string="Resolution")
resolution = fields.Text()
team_id = fields.Many2one("helpdesk.ticket.team", string="Helpdesk Team")
stage_id = fields.Many2one("helpdesk.ticket.stage", string="Stage")
ticket_id = fields.Many2one("helpdesk.ticket", string="Ticket")
Expand Down

0 comments on commit deb512d

Please sign in to comment.