diff --git a/fieldservice_skill/README.rst b/fieldservice_skill/README.rst new file mode 100644 index 0000000000..1da54e52ff --- /dev/null +++ b/fieldservice_skill/README.rst @@ -0,0 +1,141 @@ +====================== +Field Service - Skills +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-OCA%2Ffield--service-lightgray.png?logo=github + :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_skill + :alt: OCA/field-service +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_skill + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/264/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Odoo Field Service App allows to assign any FS worker to any FS order. +For some organizations, they cannot assign any FS worker to any order. +They needs to manage the skills of the FS workers and reduce the list of +potential FS workers on an order to avoid wrong assignment and mis-configuration. +The skills of the selectable FS workers on a service order needs to match the +required skills to perform the order. + +This modules allows you to set skills on categories to automatically set those +skills on the order. It also allows you to set the skills to the field service +worker with their level. On the order, the list of field service workers is +filtered with the skills and the location so you can only assign the right +worker to the order. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +To install Field Service and have the mapping features, you need to install GeoEngine. + +Please refer to the installation instructions available at: +https://github.com/OCA/geospatial/tree/12.0/base_geoengine + +Configuration +============= + +To configure this module, you need to: + +* Create or edit your categories to set skills +* Create or edit your workers to set their skills and skill levels +* Create or edit your territories to set their field service workers +* Create or edit your locations to set their territories + +Usage +===== + +To use this module, you need to: + +* Create an order, set the template and the location + + * The categories and skills are set based on the template. + * The field service worker is set to the preferred worker if skills matches. + * The list of field service workers is filtered with the one serving the + location (using the territory) and having the skills + +Known issues / Roadmap +====================== + +The roadmap of the Field Service application is documented on +`Github `_. + +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 +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Wolfgang Hall +* Maxime Chambreuil +* Steve Campbell +* Serpent Consulting Services Pvt. Ltd. + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* Open Source Integrators + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +.. |maintainer-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px + :target: https://github.com/osi-scampbell + :alt: osi-scampbell +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainers `__: + +|maintainer-osi-scampbell| |maintainer-max3903| + +This module is part of the `OCA/field-service `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_skill/__init__.py b/fieldservice_skill/__init__.py new file mode 100644 index 0000000000..631bd4893a --- /dev/null +++ b/fieldservice_skill/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/fieldservice_skill/__manifest__.py b/fieldservice_skill/__manifest__.py new file mode 100644 index 0000000000..77e3094528 --- /dev/null +++ b/fieldservice_skill/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Field Service - Skills", + "summary": "Manage your Field Service workers skills", + "version": "13.0.1.0.0", + "category": "Field Service", + "license": "AGPL-3", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/field-service", + "depends": ["hr_skills", "fieldservice"], + "data": [ + "security/ir.model.access.csv", + "views/fsm_person.xml", + "views/fsm_category.xml", + "views/fsm_person_skill.xml", + "views/fsm_order.xml", + "views/hr_skill.xml", + "views/fsm_template.xml", + ], + "development_status": "Beta", + "maintainers": ["osi-scampbell", "max3903"], + "installable": True, +} diff --git a/fieldservice_skill/i18n/de.po b/fieldservice_skill/i18n/de.po new file mode 100644 index 0000000000..62852e1d38 --- /dev/null +++ b/fieldservice_skill/i18n/de.po @@ -0,0 +1,154 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_skill +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-26 14:27+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill +msgid "Create a worker skill." +msgstr "Mitarbeiter-F??higkeit erstellen." + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Expert" +msgstr "Experte" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_order +msgid "Field Service Order" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_template +msgid "Field Service Order Template" +msgstr "Field-Service-Auftragsvorlage" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__person_id +msgid "Field Service Worker" +msgstr "Service-Mitarbeiter" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_category +msgid "Field Service Worker Category" +msgstr "Mitarbeiter-Kategorie" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person_skill +msgid "Field Service Worker Skill" +msgstr "Mitarbeiter-F??higkeit" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__id +msgid "ID" +msgstr "ID" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Intermediate" +msgstr "Ge??bter Anf??nger" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Junior" +msgstr "Anf??nger" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill____last_update +msgid "Last Modified on" +msgstr "Zuletzt ge??ndert am" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__level +msgid "Level" +msgstr "Grad" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_category__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_order__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_template__skill_ids +msgid "Required Skills" +msgstr "Ben??tigte F??higkeiten" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Senior" +msgstr "Fortgeschritten" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__skill_id +msgid "Skill" +msgstr "F??higkeit" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person__skill_ids +#: model:ir.ui.menu,name:fieldservice_skill.menu_hr_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_category_form +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_form +msgid "Skills" +msgstr "F??higkeiten" + +#. module: fieldservice_skill +#: sql_constraint:fsm.person.skill:0 +msgid "This person already has that skill!" +msgstr "Die Person hat diese F??higkeit bereits!" + +#. module: fieldservice_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_form +msgid "Worker Skill" +msgstr "Mitarbeiter-F??higkeit" + +#. module: fieldservice_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill_report +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill_reporting +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_tree +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_graph +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_pivot +msgid "Worker Skills" +msgstr "Mitarbeiter-F??higkeiten" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill_report +msgid "Worker Skills Report" +msgstr "F??higkeiten-Bericht" diff --git a/fieldservice_skill/i18n/es.po b/fieldservice_skill/i18n/es.po new file mode 100644 index 0000000000..a38ade3a0c --- /dev/null +++ b/fieldservice_skill/i18n/es.po @@ -0,0 +1,154 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_skill +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-01-15 06:13+0000\n" +"Last-Translator: Nelson Ram??rez S??nchez \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill +msgid "Create a worker skill." +msgstr "Crea una habilidad de trabajador." + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__display_name +msgid "Display Name" +msgstr "Nombre para mostrar" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Expert" +msgstr "Experto" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_order +msgid "Field Service Order" +msgstr "Orden de Servicio de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_template +msgid "Field Service Order Template" +msgstr "Plantilla de Orden de Servicio de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__person_id +msgid "Field Service Worker" +msgstr "Trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_category +msgid "Field Service Worker Category" +msgstr "Categor??a de trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person_skill +msgid "Field Service Worker Skill" +msgstr "Habilidad de trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__id +msgid "ID" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Intermediate" +msgstr "Intermedio" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Junior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill____last_update +msgid "Last Modified on" +msgstr "??ltima modificaci??n el" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_uid +msgid "Last Updated by" +msgstr "??ltima modificaci??n por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_date +msgid "Last Updated on" +msgstr "Ultima actualizaci??n en" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__level +msgid "Level" +msgstr "Nivel" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_category__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_order__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_template__skill_ids +msgid "Required Skills" +msgstr "Habilidades requeridas" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Senior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__skill_id +msgid "Skill" +msgstr "Habilidad" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person__skill_ids +#: model:ir.ui.menu,name:fieldservice_skill.menu_hr_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_category_form +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_form +msgid "Skills" +msgstr "Habilidades" + +#. module: fieldservice_skill +#: sql_constraint:fsm.person.skill:0 +msgid "This person already has that skill!" +msgstr "??Esta persona ya tiene esa habilidad!" + +#. module: fieldservice_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_form +msgid "Worker Skill" +msgstr "Habilidad Laboral" + +#. module: fieldservice_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill_report +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill_reporting +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_tree +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_graph +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_pivot +msgid "Worker Skills" +msgstr "Habilidades Laborales" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill_report +msgid "Worker Skills Report" +msgstr "Reporte de Habilidades Laborales" diff --git a/fieldservice_skill/i18n/es_CL.po b/fieldservice_skill/i18n/es_CL.po new file mode 100644 index 0000000000..242311f2e5 --- /dev/null +++ b/fieldservice_skill/i18n/es_CL.po @@ -0,0 +1,154 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_skill +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-01-15 06:13+0000\n" +"Last-Translator: Nelson Ram??rez S??nchez \n" +"Language-Team: none\n" +"Language: es_CL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill +msgid "Create a worker skill." +msgstr "Crea una habilidad de trabajador." + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__display_name +msgid "Display Name" +msgstr "Nombre para mostrar" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Expert" +msgstr "Experto" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_order +msgid "Field Service Order" +msgstr "Orden de Servicio de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_template +msgid "Field Service Order Template" +msgstr "Plantilla de Orden de Servicio de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__person_id +msgid "Field Service Worker" +msgstr "Trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_category +msgid "Field Service Worker Category" +msgstr "Categor??a de trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person_skill +msgid "Field Service Worker Skill" +msgstr "Habilidad de trabajador de servicio de campo" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__id +msgid "ID" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Intermediate" +msgstr "Intermedio" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Junior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill____last_update +msgid "Last Modified on" +msgstr "??ltima modificaci??n el" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_uid +msgid "Last Updated by" +msgstr "??ltima modificaci??n por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_date +msgid "Last Updated on" +msgstr "Ultima actualizaci??n en" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__level +msgid "Level" +msgstr "Nivel" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_category__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_order__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_template__skill_ids +msgid "Required Skills" +msgstr "Habilidades requeridas" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Senior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__skill_id +msgid "Skill" +msgstr "Habilidad" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person__skill_ids +#: model:ir.ui.menu,name:fieldservice_skill.menu_hr_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_category_form +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_form +msgid "Skills" +msgstr "Habilidades" + +#. module: fieldservice_skill +#: sql_constraint:fsm.person.skill:0 +msgid "This person already has that skill!" +msgstr "??Esta persona ya tiene esa habilidad!" + +#. module: fieldservice_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_form +msgid "Worker Skill" +msgstr "Habilidad Laboral" + +#. module: fieldservice_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill_report +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill_reporting +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_tree +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_graph +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_pivot +msgid "Worker Skills" +msgstr "Habilidades Laborales" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill_report +msgid "Worker Skills Report" +msgstr "Reporte de Habilidades Laborales" diff --git a/fieldservice_skill/i18n/fieldservice_skill.pot b/fieldservice_skill/i18n/fieldservice_skill.pot new file mode 100644 index 0000000000..a1c02c16df --- /dev/null +++ b/fieldservice_skill/i18n/fieldservice_skill.pot @@ -0,0 +1,152 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_skill +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill +msgid "Create a worker skill." +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_uid +msgid "Created by" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_date +msgid "Created on" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__display_name +msgid "Display Name" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Expert" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_order +msgid "Field Service Order" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_template +msgid "Field Service Order Template" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__person_id +msgid "Field Service Worker" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_category +msgid "Field Service Worker Category" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person_skill +msgid "Field Service Worker Skill" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__id +msgid "ID" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Intermediate" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Junior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill____last_update +msgid "Last Modified on" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_date +msgid "Last Updated on" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__level +msgid "Level" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_category__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_order__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_template__skill_ids +msgid "Required Skills" +msgstr "" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Senior" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__skill_id +msgid "Skill" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person__skill_ids +#: model:ir.ui.menu,name:fieldservice_skill.menu_hr_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_category_form +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_form +msgid "Skills" +msgstr "" + +#. module: fieldservice_skill +#: sql_constraint:fsm.person.skill:0 +msgid "This person already has that skill!" +msgstr "" + +#. module: fieldservice_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_form +msgid "Worker Skill" +msgstr "" + +#. module: fieldservice_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill_report +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill_reporting +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_tree +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_graph +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_pivot +msgid "Worker Skills" +msgstr "" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill_report +msgid "Worker Skills Report" +msgstr "" + diff --git a/fieldservice_skill/i18n/pt_BR.po b/fieldservice_skill/i18n/pt_BR.po new file mode 100644 index 0000000000..dd3695a174 --- /dev/null +++ b/fieldservice_skill/i18n/pt_BR.po @@ -0,0 +1,154 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_skill +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-06-17 16:19+0000\n" +"Last-Translator: Fernando Colus \n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill +msgid "Create a worker skill." +msgstr "Crie uma habilidade de trabalhador." + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__display_name +msgid "Display Name" +msgstr "Nome Exibido" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Expert" +msgstr "Especialista" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_order +msgid "Field Service Order" +msgstr "Ordem de Servi??o de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_template +msgid "Field Service Order Template" +msgstr "Modelo de Ordem de Servi??o de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__person_id +msgid "Field Service Worker" +msgstr "Trabalhador do Servi??o de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_category +msgid "Field Service Worker Category" +msgstr "Categoria de Trabalhadores de Servi??o de Campo" + +#. module: fieldservice_skill +#: model:ir.model,name:fieldservice_skill.model_fsm_person_skill +msgid "Field Service Worker Skill" +msgstr "Habilidade do Trabalhador de Servi??o de Campo" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__id +msgid "ID" +msgstr "ID" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Intermediate" +msgstr "Intermedi??rio" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Junior" +msgstr "J??nior" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill____last_update +msgid "Last Modified on" +msgstr "??ltima Modifica????o Feita em" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_uid +msgid "Last Updated by" +msgstr "??ltima Atualiza????o por" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__write_date +msgid "Last Updated on" +msgstr "??ltima Atualiza????o em" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__level +msgid "Level" +msgstr "N??vel" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_category__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_order__skill_ids +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_template__skill_ids +msgid "Required Skills" +msgstr "Habilidades Necess??rias" + +#. module: fieldservice_skill +#: selection:fsm.person.skill,level:0 +msgid "Senior" +msgstr "S??nior" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person_skill__skill_id +msgid "Skill" +msgstr "Habilidade" + +#. module: fieldservice_skill +#: model:ir.model.fields,field_description:fieldservice_skill.field_fsm_person__skill_ids +#: model:ir.ui.menu,name:fieldservice_skill.menu_hr_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_category_form +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_form +msgid "Skills" +msgstr "Habilidades" + +#. module: fieldservice_skill +#: sql_constraint:fsm.person.skill:0 +msgid "This person already has that skill!" +msgstr "Essa pessoa j?? tem essa habilidade!" + +#. module: fieldservice_skill +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_form +msgid "Worker Skill" +msgstr "Habilidade do Trabalhador" + +#. module: fieldservice_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill +#: model:ir.actions.act_window,name:fieldservice_skill.action_fsm_person_skill_report +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill +#: model:ir.ui.menu,name:fieldservice_skill.menu_fsm_person_skill_reporting +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.fsm_person_skill_tree +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_graph +#: model_terms:ir.ui.view,arch_db:fieldservice_skill.view_fsm_person_skill_pivot +msgid "Worker Skills" +msgstr "Habilidades do Trabalhador" + +#. module: fieldservice_skill +#: model_terms:ir.actions.act_window,help:fieldservice_skill.action_fsm_person_skill_report +msgid "Worker Skills Report" +msgstr "Relat??rio de Habilidades do Trabalhador" diff --git a/fieldservice_skill/models/__init__.py b/fieldservice_skill/models/__init__.py new file mode 100644 index 0000000000..729a9f51c3 --- /dev/null +++ b/fieldservice_skill/models/__init__.py @@ -0,0 +1,9 @@ +# Copyright (C) 2018, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import fsm_person_skill +from . import fsm_person +from . import fsm_category +from . import fsm_order +from . import fsm_template +from . import hr_skill diff --git a/fieldservice_skill/models/fsm_category.py b/fieldservice_skill/models/fsm_category.py new file mode 100644 index 0000000000..2308982978 --- /dev/null +++ b/fieldservice_skill/models/fsm_category.py @@ -0,0 +1,10 @@ +# Copyright (C) 2018, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class FSMCategory(models.Model): + _inherit = "fsm.category" + + skill_ids = fields.Many2many("hr.skill", string="Required Skills") diff --git a/fieldservice_skill/models/fsm_order.py b/fieldservice_skill/models/fsm_order.py new file mode 100644 index 0000000000..ee1662b9d1 --- /dev/null +++ b/fieldservice_skill/models/fsm_order.py @@ -0,0 +1,54 @@ +# Copyright (C) 2018, Open Source Integrators +# Copyright (C) 2020, Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +import logging + +from odoo import api, fields, models + +_logger = logging.getLogger(__name__) + + +class FSMOrder(models.Model): + _inherit = "fsm.order" + + skill_ids = fields.Many2many("hr.skill", string="Required Skills") + skill_worker_ids = fields.Many2many( + "fsm.person", + "fsm_order_skill_workers_rel", + compute="_compute_skill_workers", + help="Available workers based on skill requirements", + ) + + @api.onchange("category_ids") + def _onchange_category_ids(self): + if not self.template_id: + skill_ids = [] + for category in self.category_ids: + skill_ids.extend([skill.id for skill in category.skill_ids]) + self.skill_ids = [(6, 0, skill_ids)] + + @api.onchange("template_id") + def _onchange_template_id(self): + if self.template_id: + super(FSMOrder, self)._onchange_template_id() + self.skill_ids = self.template_id.skill_ids + + @api.depends("skill_ids") + @api.onchange("skill_ids") + def _compute_skill_workers(self): + worker_ids = [] + req_skills = self.skill_ids.ids + if not self.skill_ids: + worker_ids = self.env["fsm.person"].search([]).ids + else: + FPS = self.env["fsm.person.skill"] + potential_workers = FPS.search( + [("skill_id", "in", self.skill_ids.ids)] + ).mapped("person_id") + for w in potential_workers: + worker_skills = FPS.search([("person_id", "=", w.id)]).mapped( + "skill_id" + ) + if set(worker_skills.ids) >= set(req_skills): + worker_ids.append(w.id) + self.skill_worker_ids = [(6, 0, worker_ids)] diff --git a/fieldservice_skill/models/fsm_person.py b/fieldservice_skill/models/fsm_person.py new file mode 100644 index 0000000000..c3080556e0 --- /dev/null +++ b/fieldservice_skill/models/fsm_person.py @@ -0,0 +1,10 @@ +# Copyright (C) 2018, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class FSMPerson(models.Model): + _inherit = "fsm.person" + + skill_ids = fields.One2many("fsm.person.skill", "person_id", string="Skills") diff --git a/fieldservice_skill/models/fsm_person_skill.py b/fieldservice_skill/models/fsm_person_skill.py new file mode 100644 index 0000000000..7070480a7f --- /dev/null +++ b/fieldservice_skill/models/fsm_person_skill.py @@ -0,0 +1,46 @@ +# Copyright (C) 2018, Open Source Integrators +# Copyright (C) 2020, Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class FSMPersonSkill(models.Model): + _name = "fsm.person.skill" + _rec_name = "skill_id" + _description = "Field Service Worker Skill" + + person_id = fields.Many2one( + "fsm.person", string="Field Service Worker", required=True + ) + skill_id = fields.Many2one("hr.skill", string="Skill", required=True) + skill_level_id = fields.Many2one("hr.skill.level", required=True) + skill_type_id = fields.Many2one("hr.skill.type", required=True) + level_progress = fields.Integer(related="skill_level_id.level_progress", store=True) + + _sql_constraints = [ + ( + "person_skill_uniq", + "unique(person_id, skill_id)", + "This person already has that skill!", + ), + ] + + @api.constrains("skill_id", "skill_type_id") + def _check_skill_type(self): + for record in self: + if record.skill_id not in record.skill_type_id.skill_ids: + raise ValidationError( + _("The skill %s and skill type %s doesn't match") + % (record.skill_id.name, record.skill_type_id.name) + ) + + @api.constrains("skill_type_id", "skill_level_id") + def _check_skill_level(self): + for record in self: + if record.skill_level_id not in record.skill_type_id.skill_level_ids: + raise ValidationError( + _("The skill level %s is not valid for skill type: %s ") + % (record.skill_level_id.name, record.skill_type_id.name) + ) diff --git a/fieldservice_skill/models/fsm_template.py b/fieldservice_skill/models/fsm_template.py new file mode 100644 index 0000000000..d8b8707ed0 --- /dev/null +++ b/fieldservice_skill/models/fsm_template.py @@ -0,0 +1,10 @@ +# Copyright (C) 2018, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class FSMTemplate(models.Model): + _inherit = "fsm.template" + + skill_ids = fields.Many2many("hr.skill", string="Required Skills") diff --git a/fieldservice_skill/models/hr_skill.py b/fieldservice_skill/models/hr_skill.py new file mode 100644 index 0000000000..6f9bfe6ab6 --- /dev/null +++ b/fieldservice_skill/models/hr_skill.py @@ -0,0 +1,10 @@ +# Copyright (C) 2020, Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class HRSkill(models.Model): + _inherit = "hr.skill" + + color = fields.Integer(string="Color Index", default=10,) diff --git a/fieldservice_skill/readme/CONFIGURE.rst b/fieldservice_skill/readme/CONFIGURE.rst new file mode 100644 index 0000000000..30e5a22dd4 --- /dev/null +++ b/fieldservice_skill/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +To configure this module, you need to: + +* Create or edit your categories to set skills +* Create or edit your workers to set their skills and skill levels +* Create or edit your territories to set their field service workers +* Create or edit your locations to set their territories diff --git a/fieldservice_skill/readme/CONTRIBUTORS.rst b/fieldservice_skill/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..45d16a07ab --- /dev/null +++ b/fieldservice_skill/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Wolfgang Hall +* Maxime Chambreuil +* Steve Campbell +* Serpent Consulting Services Pvt. Ltd. +* Brian McMaster diff --git a/fieldservice_skill/readme/CREDITS.rst b/fieldservice_skill/readme/CREDITS.rst new file mode 100644 index 0000000000..0eff0acf4e --- /dev/null +++ b/fieldservice_skill/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* Open Source Integrators diff --git a/fieldservice_skill/readme/DESCRIPTION.rst b/fieldservice_skill/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..cb08056e8d --- /dev/null +++ b/fieldservice_skill/readme/DESCRIPTION.rst @@ -0,0 +1,12 @@ +Odoo Field Service App allows to assign any FS worker to any FS order. +For some organizations, they cannot assign any FS worker to any order. +They needs to manage the skills of the FS workers and reduce the list of +potential FS workers on an order to avoid wrong assignment and mis-configuration. +The skills of the selectable FS workers on a service order needs to match the +required skills to perform the order. + +This modules allows you to set skills on categories to automatically set those +skills on the order. It also allows you to set the skills to the field service +worker with their level. On the order, the list of field service workers is +filtered with the skills and the location so you can only assign the right +worker to the order. diff --git a/fieldservice_skill/readme/INSTALL.rst b/fieldservice_skill/readme/INSTALL.rst new file mode 100644 index 0000000000..e5355c4b0f --- /dev/null +++ b/fieldservice_skill/readme/INSTALL.rst @@ -0,0 +1,4 @@ +To install Field Service and have the mapping features, you need to install GeoEngine. + +Please refer to the installation instructions available at: +https://github.com/OCA/geospatial/tree/13.0/base_geoengine diff --git a/fieldservice_skill/readme/ROADMAP.rst b/fieldservice_skill/readme/ROADMAP.rst new file mode 100644 index 0000000000..f607015959 --- /dev/null +++ b/fieldservice_skill/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +The roadmap of the Field Service application is documented on +`Github `_. diff --git a/fieldservice_skill/readme/USAGE.rst b/fieldservice_skill/readme/USAGE.rst new file mode 100644 index 0000000000..271c3da109 --- /dev/null +++ b/fieldservice_skill/readme/USAGE.rst @@ -0,0 +1,8 @@ +To use this module, you need to: + +* Create an order, set the template and the location + + * The categories and skills are set based on the template. + * The field service worker is set to the preferred worker if skills matches. + * The list of field service workers is filtered with the one serving the + location (using the territory) and having the skills diff --git a/fieldservice_skill/security/ir.model.access.csv b/fieldservice_skill/security/ir.model.access.csv new file mode 100644 index 0000000000..c1fa458247 --- /dev/null +++ b/fieldservice_skill/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_fsm_person_skill_user,fsm.person.skill.user,model_fsm_person_skill,fieldservice.group_fsm_user,1,0,0,0 +access_fsm_person_skill_dispatcher,fsm.person.skill.dispatcher,model_fsm_person_skill,fieldservice.group_fsm_dispatcher,1,1,1,1 diff --git a/fieldservice_skill/static/description/icon.png b/fieldservice_skill/static/description/icon.png new file mode 100644 index 0000000000..955674d8f0 Binary files /dev/null and b/fieldservice_skill/static/description/icon.png differ diff --git a/fieldservice_skill/static/description/index.html b/fieldservice_skill/static/description/index.html new file mode 100644 index 0000000000..e29d68f853 --- /dev/null +++ b/fieldservice_skill/static/description/index.html @@ -0,0 +1,790 @@ + + + + + + + Field Service - Skills + + + +
+

Field Service - Skills

+ + +

+ Beta + License: AGPL-3 + OCA/field-service + Translate me on Weblate + Try me on Runbot +

+

+ Odoo Field Service App allows to assign any FS worker to any FS order. For some + organizations, they cannot assign any FS worker to any order. They needs to + manage the skills of the FS workers and reduce the list of potential FS workers + on an order to avoid wrong assignment and mis-configuration. The skills of the + selectable FS workers on a service order needs to match the required skills to + perform the order. +

+

+ This modules allows you to set skills on categories to automatically set those + skills on the order. It also allows you to set the skills to the field service + worker with their level. On the order, the list of field service workers is + filtered with the skills and the location so you can only assign the right + worker to the order. +

+

Table of contents

+
+ +
+
+

Installation

+

+ To install Field Service and have the mapping features, you need to install + GeoEngine. +

+

+ Please refer to the installation instructions available at: + https://github.com/OCA/geospatial/tree/12.0/base_geoengine +

+
+
+

Configuration

+

To configure this module, you need to:

+
    +
  • Create or edit your categories to set skills
  • +
  • Create or edit your workers to set their skills and skill levels
  • +
  • Create or edit your territories to set their field service workers
  • +
  • Create or edit your locations to set their territories
  • +
+
+
+

Usage

+

To use this module, you need to:

+
    +
  • + Create an order, set the template and the location +
      +
    • The categories and skills are set based on the template.
    • +
    • + The field service worker is set to the preferred worker if skills + matches. +
    • +
    • + The list of field service workers is filtered with the one serving the + location (using the territory) and having the skills +
    • +
    +
  • +
+
+
+

Known issues / Roadmap

+

+ The roadmap of the Field Service application is documented on + Github. +

+
+
+

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

+
    +
  • Open Source Integrators
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The development of this module has been financially supported by:

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ Odoo Community Association +

+ 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. +

+

+ Current + maintainers: +

+

+ osi-scampbell + max3903 +

+

+ This module is part of the + OCA/field-service + project on GitHub. +

+

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

+
+
+
+ + diff --git a/fieldservice_skill/tests/__init__.py b/fieldservice_skill/tests/__init__.py new file mode 100644 index 0000000000..b45a5c28be --- /dev/null +++ b/fieldservice_skill/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2020, Brian McMaster +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from . import test_fsm_skill diff --git a/fieldservice_skill/tests/test_fsm_skill.py b/fieldservice_skill/tests/test_fsm_skill.py new file mode 100644 index 0000000000..4c58d8c4e0 --- /dev/null +++ b/fieldservice_skill/tests/test_fsm_skill.py @@ -0,0 +1,173 @@ +# Copyright 2020, Brian McMaster +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from odoo.tests import SavepointCase + + +class TestFSMSkill(SavepointCase): + @classmethod + def setUpClass(cls): + super(TestFSMSkill, cls).setUpClass() + + cls.skill = cls.env["hr.skill"] + cls.skill_level = cls.env["hr.skill.level"] + cls.skill_type = cls.env["hr.skill.type"] + cls.fsm_person = cls.env["fsm.person"] + cls.fsm_person_skill = cls.env["fsm.person.skill"] + cls.fsm_order = cls.env["fsm.order"] + cls.fsm_location = cls.env["fsm.location"] + cls.fsm_template = cls.env["fsm.template"] + cls.fsm_category = cls.env["fsm.category"] + + cls.skill_type_01 = cls.skill_type.create({"name": "Field Service Skills"}) + + # Create some great skills + cls.skill_01 = cls.skill.create( + {"name": "Nunchuck Skills", "skill_type_id": cls.skill_type_01.id} + ) + cls.skill_02 = cls.skill.create( + {"name": "Bow Hunting Skills", "skill_type_id": cls.skill_type_01.id} + ) + cls.skill_03 = cls.skill.create( + {"name": "Computer Hacking Skills", "skill_type_id": cls.skill_type_01.id} + ) + cls.skill_04 = cls.skill.create( + {"name": "Sweet Bike Owning Skills", "skill_type_id": cls.skill_type_01.id} + ) + cls.skill_05 = cls.skill.create( + { + "name": "Hooking Up with Chicks Skills", + "skill_type_id": cls.skill_type_01.id, + } + ) + cls.skill_06 = cls.skill.create( + {"name": "Moustache Growing Skills", "skill_type_id": cls.skill_type_01.id} + ) + + cls.skill_level_100 = cls.skill_level.create( + { + "name": "Great", + "skill_type_id": cls.skill_type_01.id, + "level_progress": 100, + } + ) + + # Create some great workers with their own great skills + # Our first worker, Napoleon, has nunchuck skills and bow hunting + # skills, which he learned while in Alaska hunting wolverines with his + # uncle. + cls.person_01 = cls.fsm_person.create({"name": "Napoleon"}) + cls.person_01_skill_01 = cls.fsm_person_skill.create( + { + "person_id": cls.person_01.id, + "skill_id": cls.skill_01.id, + "skill_level_id": cls.skill_level_100.id, + "skill_type_id": cls.skill_type_01.id, + } + ) + cls.person_01_skill_02 = cls.fsm_person_skill.create( + { + "person_id": cls.person_01.id, + "skill_id": cls.skill_02.id, + "skill_level_id": cls.skill_level_100.id, + "skill_type_id": cls.skill_type_01.id, + } + ) + + # Our second worker, Pedro, has a lot of really good skills which he + # learned from his cousins that have all the sweet hookups + cls.person_02 = cls.fsm_person.create({"name": "Pedro"}) + cls.person_02_skill_04 = cls.fsm_person_skill.create( + { + "person_id": cls.person_02.id, + "skill_id": cls.skill_04.id, + "skill_level_id": cls.skill_level_100.id, + "skill_type_id": cls.skill_type_01.id, + } + ) + cls.person_02_skill_05 = cls.fsm_person_skill.create( + { + "person_id": cls.person_02.id, + "skill_id": cls.skill_05.id, + "skill_level_id": cls.skill_level_100.id, + "skill_type_id": cls.skill_type_01.id, + } + ) + cls.person_02_skill_06 = cls.fsm_person_skill.create( + { + "person_id": cls.person_02.id, + "skill_id": cls.skill_06.id, + "skill_level_id": cls.skill_level_100.id, + "skill_type_id": cls.skill_type_01.id, + } + ) + + # Create a location for an order + cls.location_01 = cls.fsm_location.create( + { + "name": "Summer's House", + "owner_id": cls.env["res.partner"] + .create({"name": "Summer's Parents"}) + .id, + } + ) + + # Create a category that requires great skills + cls.category_01_skills = [cls.skill_04.id, cls.skill_05.id, cls.skill_06.id] + cls.category_01 = cls.fsm_category.create( + {"name": "Sales", "skill_ids": [(6, 0, cls.category_01_skills)]} + ) + + # Create a template that requires great skills + cls.template_01_skills = [cls.skill_01.id, cls.skill_02.id] + cls.template_01 = cls.fsm_template.create( + {"name": "Template Name", "skill_ids": [(6, 0, cls.template_01_skills)]} + ) + + # Create an order that requires no skills + cls.order_no_skills = cls.fsm_order.create({"location_id": cls.location_01.id}) + + # Create an order with a category + cls.order_category_skills = cls.fsm_order.create( + { + "location_id": cls.location_01.id, + "category_ids": [(6, 0, [cls.category_01.id])], + } + ) + + # Create an order with a template + cls.order_template_skills = cls.fsm_order.create( + {"location_id": cls.location_01.id, "template_id": cls.template_01.id} + ) + + def test_fsm_skills(self): + + # Validate the order without skills can be done by all workers + self.assertEqual( + self.order_no_skills.skill_worker_ids.ids, + self.fsm_person.search([]).ids, + "FSM Order without skills should allow all workers", + ) + + # Trigger the category onchange and validate skill_ids get set + self.order_category_skills._onchange_category_ids() + self.assertEqual( + self.order_category_skills.skill_ids.ids, + self.category_01_skills, + "The order should have skills based on the category", + ) + + # Trigger the template onchange and validate skill_ids get set + self.order_template_skills._onchange_template_id() + self.assertEqual( + self.order_template_skills.skill_ids.ids, + self.template_01_skills, + "The order should have skills based on the template", + ) + + # Validate the skilled order can be done by Pedro who has the skills + self.assertEqual( + self.order_category_skills.skill_worker_ids, + self.person_02, + "FSM Order should only allow workers with all skills required", + ) diff --git a/fieldservice_skill/views/fsm_category.xml b/fieldservice_skill/views/fsm_category.xml new file mode 100644 index 0000000000..3dfabd30eb --- /dev/null +++ b/fieldservice_skill/views/fsm_category.xml @@ -0,0 +1,16 @@ + + + + + fsm.category.form + fsm.category + + + + + + + + + + diff --git a/fieldservice_skill/views/fsm_order.xml b/fieldservice_skill/views/fsm_order.xml new file mode 100644 index 0000000000..a7615b7214 --- /dev/null +++ b/fieldservice_skill/views/fsm_order.xml @@ -0,0 +1,24 @@ + + + + + fsm.order.form + fsm.order + + + + + + + + + [("id", "in", skill_worker_ids)] + + + + + diff --git a/fieldservice_skill/views/fsm_person.xml b/fieldservice_skill/views/fsm_person.xml new file mode 100644 index 0000000000..1154cf3dc8 --- /dev/null +++ b/fieldservice_skill/views/fsm_person.xml @@ -0,0 +1,45 @@ + + + + + fsm.person.form + fsm.person + + + + +
+
+ + + + + + + + + +
+
+
+
+
+
+ + fsm.person.search + fsm.person + + + + + + + +
diff --git a/fieldservice_skill/views/fsm_person_skill.xml b/fieldservice_skill/views/fsm_person_skill.xml new file mode 100644 index 0000000000..af07cc6131 --- /dev/null +++ b/fieldservice_skill/views/fsm_person_skill.xml @@ -0,0 +1,71 @@ + + + + + fsm.person.skill.form + fsm.person.skill + +
+ + + + + + + + + + + + +
+
+
+ + + fsm.person.skill.graph + fsm.person.skill + + + + + + + + + + fsm.person.skill.pivot + fsm.person.skill + + + + + + + + + + Worker Skills + fsm.person.skill + graph,pivot + +

+ Worker Skills Report +

+
+
+ +
diff --git a/fieldservice_skill/views/fsm_template.xml b/fieldservice_skill/views/fsm_template.xml new file mode 100644 index 0000000000..6f574cbe3f --- /dev/null +++ b/fieldservice_skill/views/fsm_template.xml @@ -0,0 +1,18 @@ + + + + + fsm.template.form + fsm.template + + + + + + + + diff --git a/fieldservice_skill/views/hr_skill.xml b/fieldservice_skill/views/hr_skill.xml new file mode 100644 index 0000000000..83f42c8308 --- /dev/null +++ b/fieldservice_skill/views/hr_skill.xml @@ -0,0 +1,19 @@ + + + hr.skill.fsm.form + hr.skill + + + + + + + + + diff --git a/setup/fieldservice_skill/odoo/addons/fieldservice_skill b/setup/fieldservice_skill/odoo/addons/fieldservice_skill new file mode 120000 index 0000000000..2a9978ec32 --- /dev/null +++ b/setup/fieldservice_skill/odoo/addons/fieldservice_skill @@ -0,0 +1 @@ +../../../../fieldservice_skill \ No newline at end of file diff --git a/setup/fieldservice_skill/setup.py b/setup/fieldservice_skill/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/fieldservice_skill/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)