diff --git a/helpdesk/README.rst b/helpdesk/README.rst index b910d9a5d4..456f0ab184 100644 --- a/helpdesk/README.rst +++ b/helpdesk/README.rst @@ -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. @@ -76,6 +76,8 @@ Contributors * `Factor Libre `_: * María Alhambra + * Daniel Cano + * Adrián Cruz Maintainers ~~~~~~~~~~~ diff --git a/helpdesk_improvement/README.rst b/helpdesk_improvement/README.rst new file mode 100644 index 0000000000..16fc4ff023 --- /dev/null +++ b/helpdesk_improvement/README.rst @@ -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 `_. +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 `_. + +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 `_: + + * Carlos Martínez + +* `Adaptive City `_: + + * Aitor Bouzas + +* `SDi Soluciones, S.L. `_: + + * Oscar Soto + * Jorge Luis Quinteros + +* `C2i Change 2 improve `_: + + * Eduardo Magdalena + +* `Factor Libre `_: + + * María Alhambra + * Daniel Cano + * Adrián Cruz + +Maintainers +~~~~~~~~~~~ + +This module is part of the `aitorbouzas/helpdesk `_ project on GitHub. + +You are welcome to contribute. diff --git a/helpdesk_improvement/__init__.py b/helpdesk_improvement/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/helpdesk_improvement/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/helpdesk_improvement/__manifest__.py b/helpdesk_improvement/__manifest__.py new file mode 100644 index 0000000000..17856466e6 --- /dev/null +++ b/helpdesk_improvement/__manifest__.py @@ -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, +} diff --git a/helpdesk_improvement/i18n/es.po b/helpdesk_improvement/i18n/es.po new file mode 100644 index 0000000000..bd305f859d --- /dev/null +++ b/helpdesk_improvement/i18n/es.po @@ -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" diff --git a/helpdesk_improvement/models/__init__.py b/helpdesk_improvement/models/__init__.py new file mode 100644 index 0000000000..ff4c9e31c6 --- /dev/null +++ b/helpdesk_improvement/models/__init__.py @@ -0,0 +1,2 @@ +from . import helpdesk_improvement +from . import res_config diff --git a/helpdesk_improvement/models/helpdesk_improvement.py b/helpdesk_improvement/models/helpdesk_improvement.py new file mode 100644 index 0000000000..2bf42eedff --- /dev/null +++ b/helpdesk_improvement/models/helpdesk_improvement.py @@ -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) diff --git a/helpdesk_improvement/models/res_config.py b/helpdesk_improvement/models/res_config.py new file mode 100644 index 0000000000..7c62cce820 --- /dev/null +++ b/helpdesk_improvement/models/res_config.py @@ -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.') diff --git a/helpdesk_improvement/readme/CONFIGURE.rst b/helpdesk_improvement/readme/CONFIGURE.rst new file mode 100644 index 0000000000..4c4391a66c --- /dev/null +++ b/helpdesk_improvement/readme/CONFIGURE.rst @@ -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 diff --git a/helpdesk_improvement/readme/CONTRIBUTORS.rst b/helpdesk_improvement/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..635f74f873 --- /dev/null +++ b/helpdesk_improvement/readme/CONTRIBUTORS.rst @@ -0,0 +1,23 @@ +* `Domatix `_: + + * Carlos Martínez + * Catalin Airimitoaie + +* `Adaptive City `_: + + * Aitor Bouzas + +* `SDi Soluciones, S.L. `_: + + * Oscar Soto + * Jorge Luis Quinteros + +* `C2i Change 2 improve `_: + + * Eduardo Magdalena + +* `Factor Libre `_: + + * María Alhambra + * Daniel Cano + * Adrián Cruz diff --git a/helpdesk_improvement/readme/DESCRIPTION.rst b/helpdesk_improvement/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..e3b0891bc9 --- /dev/null +++ b/helpdesk_improvement/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds a Blacklist and a Whitelist in Odoo. diff --git a/helpdesk_improvement/readme/USAGE.rst b/helpdesk_improvement/readme/USAGE.rst new file mode 100644 index 0000000000..31e3d73a94 --- /dev/null +++ b/helpdesk_improvement/readme/USAGE.rst @@ -0,0 +1,19 @@ +#. Go to *Helpdesk > BlackList* to see the Blacklist + +To create a new item in the Blacklist ... +#. Press the *Create* button +#. Add a email and a comment + +.. figure:: ../static/description/Blacklist.png + :alt: Create BlackList item + :width: 500 px + +#. Go to *Helpdesk > WhiteList* to see the Whitelist + +To create a new item in the Whitelist ... +#. Press the *Create* button +#. Add a email and a comment + +.. figure:: ../static/description/Whitelist.png + :alt: Create WhiteList item + :width: 500 px diff --git a/helpdesk_improvement/security/ir.model.access.csv b/helpdesk_improvement/security/ir.model.access.csv new file mode 100644 index 0000000000..43253e1b05 --- /dev/null +++ b/helpdesk_improvement/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_helpdesk_ticket_blacklist_line,access_helpdesk_ticket_blacklist_line,model_helpdesk_ticket_blacklist_line,base.group_user,1,0,0,0 +access_helpdesk_ticket_whitelist_line,access_helpdesk_ticket_whitelist_line,model_helpdesk_ticket_whitelist_line,base.group_user,1,0,0,0 diff --git a/helpdesk_improvement/static/description/Blacklist.png b/helpdesk_improvement/static/description/Blacklist.png new file mode 100644 index 0000000000..a1d311c0c4 Binary files /dev/null and b/helpdesk_improvement/static/description/Blacklist.png differ diff --git a/helpdesk_improvement/static/description/Settings.png b/helpdesk_improvement/static/description/Settings.png new file mode 100644 index 0000000000..424ff95b80 Binary files /dev/null and b/helpdesk_improvement/static/description/Settings.png differ diff --git a/helpdesk_improvement/static/description/Whitelist.png b/helpdesk_improvement/static/description/Whitelist.png new file mode 100644 index 0000000000..70d52549c3 Binary files /dev/null and b/helpdesk_improvement/static/description/Whitelist.png differ diff --git a/helpdesk_improvement/views/helpdesk_improvement_menu.xml b/helpdesk_improvement/views/helpdesk_improvement_menu.xml new file mode 100644 index 0000000000..4ee3bc3a99 --- /dev/null +++ b/helpdesk_improvement/views/helpdesk_improvement_menu.xml @@ -0,0 +1,18 @@ + + + + + Configure Helpdesk + ir.actions.act_window + res.config.settings + form + inline + {'module' : 'helpdesk'} + + + + + diff --git a/helpdesk_improvement/views/helpdesk_improvement_view.xml b/helpdesk_improvement/views/helpdesk_improvement_view.xml new file mode 100644 index 0000000000..911a89addc --- /dev/null +++ b/helpdesk_improvement/views/helpdesk_improvement_view.xml @@ -0,0 +1,91 @@ + + + + + + Blacklist + helpdesk.ticket.blacklist.line + +
+ + + + +
+
+
+ + + Blacklist + helpdesk.ticket.blacklist.line + + + + + + + + + + BlackList + helpdesk.ticket.blacklist.line + form + tree,form + + +

+ Click to create a blacklist item. +

+ Helpdesk allow to have an email list in order to disable sending automatic messages. +

+
+
+ + + + + + WhiteList + helpdesk.ticket.whitelist.line + +
+ + + + +
+
+
+ + + Whitelist + helpdesk.ticket.whitelist.line + + + + + + + + + + WhiteList + helpdesk.ticket.whitelist.line + form + tree,form + + +

+ Click to create a whitelist item. +

+ Helpdesk allow to skip for this list the blacklist limitation. +

+
+
+ + +
diff --git a/helpdesk_improvement/views/res_config_view.xml b/helpdesk_improvement/views/res_config_view.xml new file mode 100644 index 0000000000..9f9aeda8d9 --- /dev/null +++ b/helpdesk_improvement/views/res_config_view.xml @@ -0,0 +1,32 @@ + + + + helpdesk_settings_form + res.config.settings + + + +
+

Helpdesk BlackList

+
+
+
+
+
+
+
+
+
+
+ +