-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by andhit-r
- Loading branch information
Showing
7 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
============================== | ||
Helpdesk - Project Integration | ||
============================== | ||
|
||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 14.0 of the repository https://github.com/open-synergy/ssi-helpdesk | ||
2. Add the path to this repository in your configuration (addons-path) | ||
3. Update the module list (Must be on developer mode) | ||
4. Go to menu *Apps -> Apps -> Main Apps* | ||
5. Search For *Helpdesk - Project Integration* | ||
6. Install the module | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/open-synergy/ssi-helpdesk/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Andhitia Rama <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://simetri-sinergi.id/logo.png | ||
:alt: PT. Simetri Sinergi Indonesia | ||
:target: https://simetri-sinergi.id | ||
|
||
This module is maintained by the PT. Simetri Sinergi Indonesia. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2022 OpenSynergy Indonesia | ||
# Copyright 2022 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html). | ||
|
||
from . import ( | ||
models, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 OpenSynergy Indonesia | ||
# Copyright 2022 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html). | ||
{ | ||
"name": "Helpdesk - Appointment Integration", | ||
"version": "14.0.1.0.0", | ||
"website": "https://simetri-sinergi.id", | ||
"author": "OpenSynergy Indonesia, PT. Simetri Sinergi Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"ssi_helpdesk", | ||
"ssi_appointment_request", | ||
], | ||
"data": [ | ||
"views/helpdesk_ticket_views.xml", | ||
], | ||
"demo": [], | ||
"images": [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2022 OpenSynergy Indonesia | ||
# Copyright 2022 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html). | ||
|
||
from . import ( | ||
helpdesk_ticket, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2022 OpenSynergy Indonesia | ||
# Copyright 2022 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class HelpdeskTicket(models.Model): | ||
_name = "helpdesk_ticket" | ||
_inherit = [ | ||
"helpdesk_ticket", | ||
] | ||
|
||
appointment_schedule_ids = fields.Many2many( | ||
string="Appointment Requests", | ||
comodel_name="appointment_request", | ||
relation="rel_helpdesk_ticket_2_appointment_request", | ||
column1="ticket_id", | ||
column2="request_id", | ||
) | ||
appointment_request_state = fields.Selection( | ||
string="Appointment Request Status", | ||
selection=[ | ||
("no_need", "Not Needed"), | ||
("open", "In Progress"), | ||
("done", "Done"), | ||
], | ||
compute="_compute_appointment_request_state", | ||
store=True, | ||
) | ||
|
||
@api.depends( | ||
"appointment_schedule_ids", | ||
"appointment_schedule_ids.appointment_id.state", | ||
) | ||
def _compute_appointment_request_state(self): | ||
for record in self: | ||
result = "no_need" | ||
|
||
count_req = len(record.appointment_schedule_ids) | ||
|
||
if count_req > 0: | ||
result = "done" | ||
for req in record.appointment_schedule_ids: | ||
if not req.appointment_id: | ||
result = "open" | ||
elif req.appointment_id.state != "done": | ||
result = "open" | ||
|
||
record.appointment_request_state = result |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2022 OpenSynergy Indonesia | ||
Copyright 2022 PT. Simetri Sinergi Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<record id="helpdesk_ticket_view_search" model="ir.ui.view"> | ||
<field name="name">helpdesk_ticket - search</field> | ||
<field name="model">helpdesk_ticket</field> | ||
<field name="inherit_id" ref="ssi_helpdesk.helpdesk_ticket_view_search" /> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<xpath expr="//separator[@name='activity']" position="before"> | ||
<separator name="appointment" /> | ||
<filter | ||
name="not_done_appointment" | ||
string="Appointment Not Done" | ||
domain="[('appointment_request_state','=',False)]" | ||
/> | ||
<filter | ||
name="done_appointment" | ||
string="Appointment Done" | ||
domain="[('appointment_request_state','=',True)]" | ||
/> | ||
</xpath> | ||
</data> | ||
</field> | ||
</record> | ||
|
||
<record id="helpdesk_ticket_view_form" model="ir.ui.view"> | ||
<field name="name">helpdesk_ticket form</field> | ||
<field name="model">helpdesk_ticket</field> | ||
<field name="inherit_id" ref="ssi_helpdesk.helpdesk_ticket_view_form" /> | ||
<field name="mode">extension</field> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<xpath expr="//page[1]" position="after"> | ||
<page name="appointment" string="Appointments"> | ||
<group name="appointment" colspan="4" col="2"> | ||
<field name="appointment_request_state" /> | ||
</group> | ||
<field name="appointment_schedule_ids" /> | ||
</page> | ||
</xpath> | ||
</data> | ||
</field> | ||
</record> | ||
</odoo> |