diff --git a/helpdesk_mgmt/README.rst b/helpdesk_mgmt/README.rst index a15318dc2e..a5a618869e 100644 --- a/helpdesk_mgmt/README.rst +++ b/helpdesk_mgmt/README.rst @@ -17,13 +17,13 @@ Helpdesk Management :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://github.com/OCA/helpdesk/tree/17.0/helpdesk_mgmt + :target: https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt :alt: OCA/helpdesk .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/helpdesk-17-0/helpdesk-17-0-helpdesk_mgmt + :target: https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_mgmt :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=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -125,11 +125,11 @@ permissions set in Helpdesk. not assigned to any team nor user. 3. *User*: User is able to see all the tickets. -.. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Channels.PNG -.. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Categories.PNG -.. |image3| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Stages.PNG -.. |image4| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Teams.PNG -.. |image5| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tags.PNG +.. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Channels.PNG +.. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Categories.PNG +.. |image3| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Stages.PNG +.. |image4| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Teams.PNG +.. |image5| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Tags.PNG Usage ===== @@ -156,17 +156,17 @@ To create a new ticket from the kanban view: |Tickets01| -.. |Tickets_Kanban| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets_Kanban.PNG -.. |Tickets01| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets01.PNG +.. |Tickets_Kanban| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Tickets_Kanban.PNG +.. |Tickets01| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Tickets01.PNG Known issues / Roadmap ====================== -- Add a tour feature similar to what the ``project`` module defines to - discover projects / tasks. -- Update portal tests defined in ``tests/test_portal.py`` to rely on - tour specs (in JS) in order to replicate the navigation behavior of - portal users. +- Add a tour feature similar to what the ``project`` module defines to + discover projects / tasks. +- Update portal tests defined in ``tests/test_portal.py`` to rely on + tour specs (in JS) in order to replicate the navigation behavior of + portal users. Bug Tracker =========== @@ -174,7 +174,7 @@ 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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -195,54 +195,54 @@ Authors Contributors ------------ -- `Domatix `__: +- `Domatix `__: - - Carlos Martínez - - Catalin Airimitoaie - - Álvaro López - - Samuel Calvo + - Carlos Martínez + - Catalin Airimitoaie + - Álvaro López + - Samuel Calvo -- `Adaptive City `__: +- `Adaptive City `__: - - Aitor Bouzas + - Aitor Bouzas -- `SDi Soluciones, S.L. `__: +- `SDi Soluciones, S.L. `__: - - Oscar Soto - - Jorge Luis Quinteros + - Oscar Soto + - Jorge Luis Quinteros -- `C2i Change 2 improve `__: +- `C2i Change 2 improve `__: - - Eduardo Magdalena + - Eduardo Magdalena -- `Factor Libre `__: +- `Factor Libre `__: - - María Alhambra - - Daniel Cano + - María Alhambra + - Daniel Cano -- `Tecnativa `__: +- `Tecnativa `__: - - Pedro M. Baeza - - Víctor Martínez - - Carolina Fernandez - - Carlos Roca + - Pedro M. Baeza + - Víctor Martínez + - Carolina Fernandez + - Carlos Roca -- `ID42 Sistemas `__: +- `ID42 Sistemas `__: - - Marcel Savegnago - - Eduardo Aparício + - Marcel Savegnago + - Eduardo Aparício -- `Obertix `__: +- `Obertix `__: - - Vicent Cubells + - Vicent Cubells -- `Solvos `__: +- `Solvos `__: - - David Alonso + - David Alonso -- `XCG Consulting `__: +- `XCG Consulting `__: - - Houzéfa Abbasbhay + - Houzéfa Abbasbhay Maintainers ----------- @@ -257,6 +257,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 `_ project on GitHub. +This module is part of the `OCA/helpdesk `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/helpdesk_mgmt/__manifest__.py b/helpdesk_mgmt/__manifest__.py index 9c010fb278..c4d3f36947 100644 --- a/helpdesk_mgmt/__manifest__.py +++ b/helpdesk_mgmt/__manifest__.py @@ -4,7 +4,7 @@ "name": "Helpdesk Management", "summary": """ Helpdesk""", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "license": "AGPL-3", "category": "After-Sales", "author": "AdaptiveCity, " @@ -36,7 +36,7 @@ "demo": ["demo/helpdesk_demo.xml"], "assets": { "web.assets_frontend": [ - "helpdesk_mgmt/static/src/js/new_ticket.js", + "helpdesk_mgmt/static/src/js/new_ticket.esm.js", ], }, "development_status": "Beta", diff --git a/helpdesk_mgmt/controllers/main.py b/helpdesk_mgmt/controllers/main.py index ab772c6883..3d21a4b7cf 100644 --- a/helpdesk_mgmt/controllers/main.py +++ b/helpdesk_mgmt/controllers/main.py @@ -118,4 +118,4 @@ def submit_ticket(self, **kw): "res_id": new_ticket.id, } ) - return werkzeug.utils.redirect("/my/ticket/%s" % new_ticket.id) + return werkzeug.utils.redirect(f"/my/ticket/{new_ticket.id}") diff --git a/helpdesk_mgmt/models/helpdesk_ticket.py b/helpdesk_mgmt/models/helpdesk_ticket.py index cbe3dec54a..1605f55a94 100644 --- a/helpdesk_mgmt/models/helpdesk_ticket.py +++ b/helpdesk_mgmt/models/helpdesk_ticket.py @@ -208,7 +208,7 @@ def _prepare_ticket_number(self, values): def _compute_access_url(self): res = super()._compute_access_url() for item in self: - item.access_url = "/my/ticket/%s" % (item.id) + item.access_url = f"/my/ticket/{item.id}" return res # --------------------------------------------------- diff --git a/helpdesk_mgmt/models/res_partner.py b/helpdesk_mgmt/models/res_partner.py index 8d96c5a8ee..5c1a0c1c05 100644 --- a/helpdesk_mgmt/models/res_partner.py +++ b/helpdesk_mgmt/models/res_partner.py @@ -38,7 +38,7 @@ def _compute_helpdesk_ticket_count(self): def action_view_helpdesk_tickets(self): return { "name": self.name, - "view_mode": "tree,form", + "view_mode": "list,form", "res_model": "helpdesk.ticket", "type": "ir.actions.act_window", "domain": [("partner_id", "child_of", self.id)], diff --git a/helpdesk_mgmt/static/description/index.html b/helpdesk_mgmt/static/description/index.html index 5361510be9..d123d2df5a 100644 --- a/helpdesk_mgmt/static/description/index.html +++ b/helpdesk_mgmt/static/description/index.html @@ -369,7 +369,7 @@

Helpdesk Management

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:36a7b30fb064ac9da0f6450de834e1985c06233fbf0fb071bc554c3b5dc0ec75 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/helpdesk Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/helpdesk Translate me on Weblate Try me on Runboat

This module adds Helpdesk functionality in Odoo.

Table of contents

@@ -413,7 +413,7 @@

Channels

  • Set the name for the channel.
  • You can also Activate or Deactivate channels.
  • -

    image1

    +

    image1

    Categories

    @@ -424,7 +424,7 @@

    Categories

  • Set the name for the category.
  • You can also Activate or Deactivate categories.
  • -

    image2

    +

    image2

    Stages

    @@ -441,7 +441,7 @@

    Stages

  • You can add a description for the stage.
  • You can also Activate or Deactivate stages.
  • -

    image3

    +

    image3

    You can also sort the stage sequence if you move up or down the stages in the list view.

    @@ -454,7 +454,7 @@

    Teams

  • Add the teams members.
  • You can also Activate or Deactivate teams.
  • -

    image4

    +

    image4

    Tags

    @@ -466,7 +466,7 @@

    Tags

  • Set the color index for the tag.
  • You can also Activate or Deactivate tags.
  • -

    image5

    +

    image5

    Permissions

    @@ -491,7 +491,7 @@

    Usage

  • In the Kanban view, click in the kanban card of a team to see their tickets and create new ones.
  • -

    Tickets_Kanban

    +

    Tickets_Kanban

    To create a new ticket from the kanban view:

    1. Press Create button or click on the plus icon at the top of the @@ -505,7 +505,7 @@

      Usage

    2. Add a description.
    3. You can also attach files to the ticket.
    -

    Tickets01

    +

    Tickets01

    Known issues / Roadmap

    @@ -522,7 +522,7 @@

    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 to smash it by providing a detailed and welcomed -feedback.

    +feedback.

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

    @@ -602,7 +602,7 @@

    Maintainers

    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 project on GitHub.

    +

    This module is part of the OCA/helpdesk project on GitHub.

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

    diff --git a/helpdesk_mgmt/static/src/js/new_ticket.esm.js b/helpdesk_mgmt/static/src/js/new_ticket.esm.js new file mode 100644 index 0000000000..f4e5e0207c --- /dev/null +++ b/helpdesk_mgmt/static/src/js/new_ticket.esm.js @@ -0,0 +1,41 @@ +import {_t} from "@web/core/l10n/translation"; +import publicWidget from "@web/legacy/js/public/public_widget"; + +publicWidget.registry.NewTicket = publicWidget.Widget.extend({ + selector: "form[action='/submitted/ticket']", + events: Object.assign( + {}, + { + 'change input[name="attachment"]': "_onChangeAttachment", + } + ), + init() { + this._super(...arguments); + this.notification = this.bindService("notification"); + }, + _onChangeAttachment(ev) { + ev.preventDefault(); + // eslint-disable-next-line no-undef + const attachment_input = document.getElementById("attachment"); + const max_upload_size = attachment_input.getAttribute("max_upload_size"); + // eslint-disable-next-line no-undef + const dt = new DataTransfer(); + for (const file of attachment_input.files) { + if (file.size > max_upload_size) { + var message = `${file.name} file exceed the maximum file size of ${this.humanSize(max_upload_size)}.`; + this.notification.add(_t(message), {type: "danger"}); + } else { + dt.items.add(file); + } + } + attachment_input.files = dt.files; + }, + + humanSize(bytes) { + if (bytes === 0) return "0 Bytes"; + const sizes = ["Bytes", "KB", "MB", "GB", "TB"]; + const i = Math.floor(Math.log(bytes) / Math.log(1024)); + const size = bytes / Math.pow(1024, i); + return `${size.toFixed(2)} ${sizes[i]}`; + }, +}); diff --git a/helpdesk_mgmt/static/src/js/new_ticket.js b/helpdesk_mgmt/static/src/js/new_ticket.js deleted file mode 100644 index 5c7625c321..0000000000 --- a/helpdesk_mgmt/static/src/js/new_ticket.js +++ /dev/null @@ -1,36 +0,0 @@ -odoo.define("helpdesk_mgmt.new_ticket", function (require) { - "use strict"; - var publicWidget = require("web.public.widget"); - var core = require("web.core"); - var utils = require("web.utils"); - var _t = core._t; - - publicWidget.registry.NewTicket = publicWidget.Widget.extend({ - selector: "form[action='/submitted/ticket']", - events: { - 'change input[name="attachment"]': "_onChangeAttachment", - }, - _onChangeAttachment(ev) { - ev.preventDefault(); - const attachment_input = document.getElementById("attachment"); - const max_upload_size = attachment_input.getAttribute("max_upload_size"); - const dt = new DataTransfer(); - for (const file of attachment_input.files) { - if (file.size > max_upload_size) { - this.displayNotification({ - title: _t("File upload"), - message: _.str.sprintf( - _t("%s file exceed the maximum file size of %s."), - file.name, - utils.human_size(max_upload_size) - ), - type: "danger", - }); - } else { - dt.items.add(file); - } - } - attachment_input.files = dt.files; - }, - }); -}); diff --git a/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml index 4c1e865dfa..e5e6fcb50e 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml @@ -53,10 +53,10 @@ - view.helpdesk_category.tree + view.helpdesk_category.list helpdesk.ticket.category - + - + diff --git a/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml index ec65e05266..d95cdd16ea 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml @@ -52,10 +52,10 @@ - view.helpdesk_channel.tree + view.helpdesk_channel.list helpdesk.ticket.channel - + - + diff --git a/helpdesk_mgmt/views/helpdesk_ticket_menu.xml b/helpdesk_mgmt/views/helpdesk_ticket_menu.xml index 50448a733e..19841405c7 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_menu.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_menu.xml @@ -5,13 +5,13 @@ Dashboard ir.actions.act_window helpdesk.ticket.team - kanban,tree,form,pivot + kanban,list,form,pivot Tickets ir.actions.act_window helpdesk.ticket - tree,kanban,form,pivot + list,kanban,form,pivot Reporting @@ -23,31 +23,31 @@ Channels ir.actions.act_window helpdesk.ticket.channel - tree,form + list,form Categories ir.actions.act_window helpdesk.ticket.category - tree,form + list,form Teams ir.actions.act_window helpdesk.ticket.team - tree,form + list,form Stages ir.actions.act_window helpdesk.ticket.stage - tree,form + list,form Ticket Tags ir.actions.act_window helpdesk.ticket.tag - tree,form + list,form - helpdesk.ticket.stage.tree + helpdesk.ticket.stage.list helpdesk.ticket.stage - + @@ -82,7 +82,7 @@ optional="hide" groups="base.group_multi_company" /> - + diff --git a/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml index f089fdef5f..1218303577 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml @@ -44,14 +44,14 @@ - helpdesk.ticket.tag.tree + helpdesk.ticket.tag.list helpdesk.ticket.tag - + - + diff --git a/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml index 6d8c92a0cc..18599d324f 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml @@ -140,22 +140,15 @@ -
    - - -
    + - view.helpdesk_team.tree + view.helpdesk_team.list helpdesk.ticket.team - + @@ -177,7 +170,7 @@ optional="hide" groups="base.group_multi_company" /> - + diff --git a/helpdesk_mgmt/views/helpdesk_ticket_templates.xml b/helpdesk_mgmt/views/helpdesk_ticket_templates.xml index f1c17a5feb..be9a3c14e3 100644 --- a/helpdesk_mgmt/views/helpdesk_ticket_templates.xml +++ b/helpdesk_mgmt/views/helpdesk_ticket_templates.xml @@ -155,238 +155,220 @@ + +