Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11.0 helpdesk improvement #13

Open
wants to merge 6 commits into
base: 11.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion helpdesk/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Helpdesk
:target: https://github.com/aitorbouzas/helpdesk/tree/11.0/helpdesk
:alt: aitorbouzas/helpdesk

|badge1| |badge2| |badge3|
|badge1| |badge2| |badge3|

This module adds Helpdesk functionality in Odoo.

Expand Down Expand Up @@ -76,6 +76,8 @@ Contributors
* `Factor Libre <https://factorlibre.com>`_:

* María Alhambra
* Daniel Cano
* Adrián Cruz

Maintainers
~~~~~~~~~~~
Expand Down
87 changes: 87 additions & 0 deletions helpdesk_improvement/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=====================
Helpdesk Improvement
=====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-aitorbouzas%2Fhelpdesk-lightgray.png?logo=github
:target: https://github.com/aitorbouzas/helpdesk/tree/11.0/helpdesk
:alt: aitorbouzas/helpdesk

|badge1| |badge2| |badge3|

This module adds Helpdesk functionality in Odoo.

**Table of contents**

.. contents::
:local:

Usage
=====

* Go to...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/aitorbouzas/helpdesk/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/aitorbouzas/helpdesk/issues/new?body=module:%20helpdesk%0Aversion:%2011.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.

Credits
=======

Authors
~~~~~~~

* AdaptiveCity
* C2i Change 2 Improve
* Domatix
* Factor Libre
* SDi Soluciones

Contributors
~~~~~~~~~~~~

* `Domatix <https://www.domatix.com>`_:

* Carlos Martínez

* `Adaptive City <https://www.adaptivecity.com>`_:

* Aitor Bouzas

* `SDi Soluciones, S.L. <https://www.sdi.es>`_:

* Oscar Soto
* Jorge Luis Quinteros

* `C2i Change 2 improve <http://www.c2i.es>`_:

* Eduardo Magdalena <emagdalena@c2i.es>

* `Factor Libre <https://factorlibre.com>`_:

* María Alhambra
* Daniel Cano
* Adrián Cruz

Maintainers
~~~~~~~~~~~

This module is part of the `aitorbouzas/helpdesk <https://github.com/aitorbouzas/helpdesk/tree/11.0/helpdesk>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions helpdesk_improvement/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
30 changes: 30 additions & 0 deletions helpdesk_improvement/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'Helpdesk Improvement',
'summary': """
Helpdesk""",
'version': '11.0.1.0.0',
'license': 'AGPL-3',
'category': 'After-Sales',
'author': 'AdaptiveCity, '
'C2i Change 2 Improve, '
'Domatix, '
'Factor Libre, '
'SDi Soluciones, '
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/helpdesk',
'depends': [
'helpdesk',
'mail',
'portal',
],
'data': [
'views/res_config_view.xml',
'security/ir.model.access.csv',
'views/helpdesk_improvement_menu.xml',
'views/helpdesk_improvement_view.xml'
],
'application': True,
'installable': True,
}
148 changes: 148 additions & 0 deletions helpdesk_improvement/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * helpdesk_improvement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-20 08:54+0000\n"
"PO-Revision-Date: 2019-06-20 11:06+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es\n"
"X-Generator: Poedit 2.0.6\n"

#. module: helpdesk_improvement
#: model:ir.actions.act_window,name:helpdesk_improvement.case_helpdesk_blacklist
#: model:ir.ui.menu,name:helpdesk_improvement.menu_help_blacklist
msgid "BlackList"
msgstr "BlackList"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "BlackList Configuration:"
msgstr "Configuración de la BlackList:"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.helpdesk_form_view_blacklist
msgid "Blacklist Form"
msgstr "Blacklist Form"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.helpdesk_tree_view_blacklist
msgid "Blacklist Tree"
msgstr "Blacklist Tree"

#. module: helpdesk_improvement
#: model:ir.actions.act_window,help:helpdesk_improvement.case_helpdesk_blacklist
msgid "Click to create a blacklist item."
msgstr "Pulsa el botón para crear un elemento en la BlackList."

#. module: helpdesk_improvement
#: model:ir.actions.act_window,help:helpdesk_improvement.case_helpdesk_whitelist
msgid "Click to create a whitelist item."
msgstr "Pulsa el botón para crear un elemento en la WhiteList."

#. module: helpdesk_improvement
#: model:ir.actions.act_window,name:helpdesk_improvement.helpdesk_ticket_config_settings_action
msgid "Configure Helpdesk"
msgstr "Configuración de Helpdesk"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "Create BlackList item when"
msgstr "Crea un elemento en la BlackList cuando "

#. module: helpdesk_improvement
#: model:ir.model,name:helpdesk_improvement.model_helpdesk_ticket_blacklist_line
msgid "Emails detected as machines"
msgstr "Mails detectados como máquinas"

#. module: helpdesk_improvement
#: model:ir.model,name:helpdesk_improvement.model_helpdesk_ticket_whitelist_line
msgid "Emails excluded from blacklist"
msgstr "Mails excluidos para la creación automática de elementos para la BlackList"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "Helpdesk"
msgstr "Helpdesk"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "Helpdesk BlackList"
msgstr "Helpdesk BlackList"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.crm_helpdesk_form_view_whitelist
msgid "Helpdesk Whitelist"
msgstr "Helpdesk Whitelist"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.helpdesk_tree_view_whitelist
msgid "Helpdesk Whitelist Tree"
msgstr "Helpdesk Whitelist Tree"

#. module: helpdesk_improvement
#: model:ir.actions.act_window,help:helpdesk_improvement.case_helpdesk_blacklist
msgid "Helpdesk allow to have an email list in order to disable sending automatic messages."
msgstr "El sistema de helpdesk permite tener una lista de direcciones de correo electronico con el fin de que se deshabilite para los tickets creados por ellos el envío de mails automáticos."

#. module: helpdesk_improvement
#: model:ir.actions.act_window,help:helpdesk_improvement.case_helpdesk_whitelist
msgid "Helpdesk allow to skip for this list the blacklist limitation."
msgstr "El sistema de helpdesk permite establecer excepciones para evitar que el sistema cree elementos automaticamente en la BlackList."

#. module: helpdesk_improvement
#: model:ir.model.fields,field_description:helpdesk_improvement.field_connector_config_settings_helpdesk_improvement_number_of_minutes
#: model:ir.model.fields,field_description:helpdesk_improvement.field_res_config_settings_helpdesk_improvement_number_of_minutes
msgid "Number of minutes."
msgstr "Número de minutos."

#. module: helpdesk_improvement
#: model:ir.model.fields,field_description:helpdesk_improvement.field_connector_config_settings_helpdesk_improvement_number_of_tickets
#: model:ir.model.fields,field_description:helpdesk_improvement.field_res_config_settings_helpdesk_improvement_number_of_tickets
msgid "Number of tickets."
msgstr "Número de tickets creados."

#. module: helpdesk_improvement
#: model:ir.ui.menu,name:helpdesk_improvement.helpdesk_ticket_config_settings_menu
msgid "Settings"
msgstr "Ajustes"

#. module: helpdesk_improvement
#: code:addons/helpdesk_improvement/models/helpdesk_improvement.py:10
#: code:addons/helpdesk_improvement/models/helpdesk_improvement.py:25
#: code:addons/naturitas/OCA/h_fl/OCA-helpdesk/helpdesk_improvement/models/helpdesk_improvement.py:10
#: code:addons/naturitas/OCA/h_fl/OCA-helpdesk/helpdesk_improvement/models/helpdesk_improvement.py:25
#: sql_constraint:helpdesk.ticket.blacklist.line:0
#: sql_constraint:helpdesk.ticket.whitelist.line:0
#, python-format
msgid "The email must be unique!"
msgstr "El email debe ser único!"

#. module: helpdesk_improvement
#: model:ir.actions.act_window,name:helpdesk_improvement.case_helpdesk_whitelist
#: model:ir.ui.menu,name:helpdesk_improvement.menu_help_whitelist
msgid "WhiteList"
msgstr "WhiteList"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "minutes."
msgstr " minutos."

#. module: helpdesk_improvement
#: model:ir.model,name:helpdesk_improvement.model_res_config_settings
msgid "res.config.settings"
msgstr "res.config.settings"

#. module: helpdesk_improvement
#: model:ir.ui.view,arch_db:helpdesk_improvement.res_config_settings_view_form_inherit_helpdesk
msgid "tickets are created over a period of"
msgstr " tickets sean creados en un periodo de tiempo de"
2 changes: 2 additions & 0 deletions helpdesk_improvement/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import helpdesk_improvement
from . import res_config
33 changes: 33 additions & 0 deletions helpdesk_improvement/models/helpdesk_improvement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from odoo import fields, models, _


class HelpdeskBlacklistLine(models.Model):
_name = "helpdesk.ticket.blacklist.line"
_description = "Emails detected as machines"

_sql_constraints = [
('helpdesk_ticket_blacklist_lineunique_code', 'UNIQUE (email)',
_('The email must be unique!')),
]

email = fields.Char('Email', help="email to block", required=True)
comment = fields.Text(
'Comment',
help="Reason wich this email is in the list", required=True)


class HelpdeskWhitelistLine(models.Model):
_name = "helpdesk.ticket.whitelist.line"
_description = "Emails excluded from blacklist"

_sql_constraints = [
('crm_helpdesk_whitelist_unique_code', 'UNIQUE (email)',
_('The email must be unique!')),
]

email = fields.Char(
'Email', help="email to exclude from blacklist",
required=True)
comment = fields.Text(
'Comment',
help="Reason wich this email is in the list", required=True)
44 changes: 44 additions & 0 deletions helpdesk_improvement/models/res_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from odoo import fields, models, api


class HelpdeskConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'

# Getter / Setter Section
@api.model
def get_values(self):
res = super().get_values()
ir_config_sudo = self.env['ir.config_parameter'].sudo()
number_of_minutes = ir_config_sudo.get_param(
'helpdesk_improvement_number_of_minutes')
number_of_tickets = ir_config_sudo.get_param(
'helpdesk_improvement_number_of_tickets')
res.update(
helpdesk_improvement_number_of_minutes=int(
number_of_minutes),
helpdesk_improvement_number_of_tickets=int(
number_of_tickets
)
)
return res

@api.multi
def set_values(self):
super().set_values()
ir_config_sudo = self.env['ir.config_parameter'].sudo()
if self.helpdesk_improvement_number_of_minutes:
ir_config_sudo.set_param(
'helpdesk_improvement_number_of_minutes',
self.helpdesk_improvement_number_of_minutes
)
if self.helpdesk_improvement_number_of_tickets:
ir_config_sudo.set_param(
'helpdesk_improvement_number_of_tickets',
self.helpdesk_improvement_number_of_tickets
)

helpdesk_improvement_number_of_tickets = fields.Integer(
string='Number of tickets.')

helpdesk_improvement_number_of_minutes = fields.Integer(
string='Number of minutes.')
14 changes: 14 additions & 0 deletions helpdesk_improvement/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
To configure this module, you need to:
#. Create the range of emails per minute.

-------------------
Settings
-------------------

#. Go to *Helpdesk > Configuration > Settings* to edit the range.
#. Edit the range of the Blacklist configuration.
#. Set the number of emails and the minutes.

.. figure:: ../static/description/Settings.png
:alt: Settings
:width: 600 px
Loading