diff --git a/mgmtsystem_action_efficacy/README.rst b/mgmtsystem_action_efficacy/README.rst new file mode 100644 index 00000000000..24d38ad2e1c --- /dev/null +++ b/mgmtsystem_action_efficacy/README.rst @@ -0,0 +1,100 @@ +=================================== +Management System - Action Efficacy +=================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:97cfeac5adeb3dd36701636c84ff03ee89996150e1c3617095c7c4a99484b66e + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fmanagement--system-lightgray.png?logo=github + :target: https://github.com/OCA/management-system/tree/17.0/mgmtsystem_action_efficacy + :alt: OCA/management-system +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/management-system-17-0/management-system-17-0-mgmtsystem_action_efficacy + :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/management-system&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module add efficacy information for Management System Actions. + +Action + +- new tab in the Action form view to evaluate the efficacy of the + action. Changes are tracked. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Action Efficacy + +- Go to Management System → Actions +- Create new Action +- Store data on Efficacy tab + +Changelog +========= + +12.0.1.0.0 (2020-07-01) +----------------------- + +- [INI] Initial development + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Associazione PNLUG - Gruppo Odoo + +Contributors +------------ + +- Marcelo Frare +- Stefano Consolaro +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + +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. + +This module is part of the `OCA/management-system `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mgmtsystem_action_efficacy/__init__.py b/mgmtsystem_action_efficacy/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/mgmtsystem_action_efficacy/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mgmtsystem_action_efficacy/__manifest__.py b/mgmtsystem_action_efficacy/__manifest__.py new file mode 100644 index 00000000000..22c0ba5b3a4 --- /dev/null +++ b/mgmtsystem_action_efficacy/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo ) +# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "Management System - Action Efficacy", + "summary": "Add information on the application of the Action.", + "version": "17.0.1.0.0", + "development_status": "Beta", + "author": "Associazione PNLUG - Gruppo Odoo, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/management-system", + "license": "AGPL-3", + "category": "Management System", + "depends": ["mgmtsystem_action"], + "data": ["views/mgmtsystem_action_views.xml"], + "installable": True, +} diff --git a/mgmtsystem_action_efficacy/i18n/es.po b/mgmtsystem_action_efficacy/i18n/es.po new file mode 100644 index 00000000000..cf235a08e1c --- /dev/null +++ b/mgmtsystem_action_efficacy/i18n/es.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mgmtsystem_action_efficacy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-07 14:10+0000\n" +"Last-Translator: Ivorra78 \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 4.17\n" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,help:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "0:not effective | 50:efficacy not complete | 100: effective" +msgstr "0:no eficaz | 50:eficacia no completa | 100: eficaz" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model,name:mgmtsystem_action_efficacy.model_mgmtsystem_action +msgid "Action" +msgstr "Acción" + +#. module: mgmtsystem_action_efficacy +#: model_terms:ir.ui.view,arch_db:mgmtsystem_action_efficacy.view_mgmtsystem_action_form +msgid "Efficacy" +msgstr "Eficacia" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_user_id +msgid "Inspector" +msgstr "el inspector/a" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_description +msgid "Notes" +msgstr "Notas" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "Rating" +msgstr "valoración" + +#. module: mgmtsystem_action_efficacy +#. odoo-python +#: code:addons/mgmtsystem_action_efficacy/models/mgmtsystem_action.py:0 +#: code:addons/mgmtsystem_action_efficacy/tests/test_efficacy.py:0 +#, python-format +msgid "Rating must be between 0 and 100" +msgstr "La puntuación debe estar comprendida entre 0 y 100" diff --git a/mgmtsystem_action_efficacy/i18n/fa.po b/mgmtsystem_action_efficacy/i18n/fa.po new file mode 100644 index 00000000000..70a138450b0 --- /dev/null +++ b/mgmtsystem_action_efficacy/i18n/fa.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mgmtsystem_action_efficacy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-29 15:34+0000\n" +"Last-Translator: Mostafa Barmshory \n" +"Language-Team: none\n" +"Language: fa\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 4.17\n" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,help:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "0:not effective | 50:efficacy not complete | 100: effective" +msgstr "0: ناکارآمد/50: نیمه کارآمد/100: کارآمد" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model,name:mgmtsystem_action_efficacy.model_mgmtsystem_action +msgid "Action" +msgstr "اقدام" + +#. module: mgmtsystem_action_efficacy +#: model_terms:ir.ui.view,arch_db:mgmtsystem_action_efficacy.view_mgmtsystem_action_form +msgid "Efficacy" +msgstr "کارآمدی" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_user_id +msgid "Inspector" +msgstr "بازرس" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_description +msgid "Notes" +msgstr "یادداشت‌ها" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "Rating" +msgstr "رتبه‌بندی" + +#. module: mgmtsystem_action_efficacy +#. odoo-python +#: code:addons/mgmtsystem_action_efficacy/models/mgmtsystem_action.py:0 +#: code:addons/mgmtsystem_action_efficacy/tests/test_efficacy.py:0 +#, python-format +msgid "Rating must be between 0 and 100" +msgstr "رتبه‌بندی باید بین 0 و 100 باشد" diff --git a/mgmtsystem_action_efficacy/i18n/it.po b/mgmtsystem_action_efficacy/i18n/it.po new file mode 100644 index 00000000000..831ecb3cdfc --- /dev/null +++ b/mgmtsystem_action_efficacy/i18n/it.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mgmtsystem_action_efficacy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-01-26 09:11+0000\n" +"PO-Revision-Date: 2022-11-15 17:44+0000\n" +"Last-Translator: mymage \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,help:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "0:not effective | 50:efficacy not complete | 100: effective" +msgstr "0: non efficace | 50: efficacia non completa | 100: efficace" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model,name:mgmtsystem_action_efficacy.model_mgmtsystem_action +msgid "Action" +msgstr "Azione" + +#. module: mgmtsystem_action_efficacy +#: model_terms:ir.ui.view,arch_db:mgmtsystem_action_efficacy.view_mgmtsystem_action_form +msgid "Efficacy" +msgstr "Efficace" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_user_id +msgid "Inspector" +msgstr "Ispettore" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_description +msgid "Notes" +msgstr "Note" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "Rating" +msgstr "Valutazione" + +#. module: mgmtsystem_action_efficacy +#. odoo-python +#: code:addons/mgmtsystem_action_efficacy/models/mgmtsystem_action.py:0 +#: code:addons/mgmtsystem_action_efficacy/tests/test_efficacy.py:0 +#, python-format +msgid "Rating must be between 0 and 100" +msgstr "La valutazione deve essere tra 0 e 100" + +#~ msgid "Display Name" +#~ msgstr "Nome visualizzato" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/mgmtsystem_action_efficacy/i18n/mgmtsystem_action_efficacy.pot b/mgmtsystem_action_efficacy/i18n/mgmtsystem_action_efficacy.pot new file mode 100644 index 00000000000..3a98a8376c8 --- /dev/null +++ b/mgmtsystem_action_efficacy/i18n/mgmtsystem_action_efficacy.pot @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mgmtsystem_action_efficacy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: mgmtsystem_action_efficacy +#: model:ir.model.fields,help:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "0:not effective | 50:efficacy not complete | 100: effective" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model,name:mgmtsystem_action_efficacy.model_mgmtsystem_action +msgid "Action" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#: model_terms:ir.ui.view,arch_db:mgmtsystem_action_efficacy.view_mgmtsystem_action_form +msgid "Efficacy" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_user_id +msgid "Inspector" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_description +msgid "Notes" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#: model:ir.model.fields,field_description:mgmtsystem_action_efficacy.field_mgmtsystem_action__efficacy_value +msgid "Rating" +msgstr "" + +#. module: mgmtsystem_action_efficacy +#. odoo-python +#: code:addons/mgmtsystem_action_efficacy/models/mgmtsystem_action.py:0 +#: code:addons/mgmtsystem_action_efficacy/tests/test_efficacy.py:0 +#, python-format +msgid "Rating must be between 0 and 100" +msgstr "" diff --git a/mgmtsystem_action_efficacy/models/__init__.py b/mgmtsystem_action_efficacy/models/__init__.py new file mode 100644 index 00000000000..bff54cb730c --- /dev/null +++ b/mgmtsystem_action_efficacy/models/__init__.py @@ -0,0 +1 @@ +from . import mgmtsystem_action diff --git a/mgmtsystem_action_efficacy/models/mgmtsystem_action.py b/mgmtsystem_action_efficacy/models/mgmtsystem_action.py new file mode 100644 index 00000000000..5baf2d1bfcf --- /dev/null +++ b/mgmtsystem_action_efficacy/models/mgmtsystem_action.py @@ -0,0 +1,36 @@ +# Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo ) +# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo ) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class MgmtsystemAction(models.Model): + """ + Extend actions adding fields for record efficacy informations with changes tracking + """ + + _inherit = "mgmtsystem.action" + + # new fileds + # value of efficacy + efficacy_value = fields.Integer( + "Rating", + help="0:not effective | 50:efficacy not complete | 100: effective", + track_visibility=True, + ) + # user in charge of evaluation + efficacy_user_id = fields.Many2one( + "res.users", + "Inspector", + track_visibility=True, + ) + # notes on the efficacy + efficacy_description = fields.Text("Notes") + + @api.onchange("efficacy_value") + def _onchange_efficacy_value(self): + if self.efficacy_value < 0 or self.efficacy_value > 100: + raise ValidationError(_("Rating must be between 0 and 100")) + return diff --git a/mgmtsystem_action_efficacy/pyproject.toml b/mgmtsystem_action_efficacy/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/mgmtsystem_action_efficacy/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/mgmtsystem_action_efficacy/readme/CONTRIBUTORS.md b/mgmtsystem_action_efficacy/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..08c409de4ad --- /dev/null +++ b/mgmtsystem_action_efficacy/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Marcelo Frare \<\> +- Stefano Consolaro \<\> +- [Heliconia Solutions Pvt. Ltd.\]() diff --git a/mgmtsystem_action_efficacy/readme/DESCRIPTION.md b/mgmtsystem_action_efficacy/readme/DESCRIPTION.md new file mode 100644 index 00000000000..1773a0c583c --- /dev/null +++ b/mgmtsystem_action_efficacy/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +This module add efficacy information for Management System Actions. + +Action + +- new tab in the Action form view to evaluate the efficacy of the + action. Changes are tracked. diff --git a/mgmtsystem_action_efficacy/readme/HISTORY.md b/mgmtsystem_action_efficacy/readme/HISTORY.md new file mode 100644 index 00000000000..dba71c29c56 --- /dev/null +++ b/mgmtsystem_action_efficacy/readme/HISTORY.md @@ -0,0 +1,3 @@ +## 12.0.1.0.0 (2020-07-01) + +- \[INI\] Initial development diff --git a/mgmtsystem_action_efficacy/readme/USAGE.md b/mgmtsystem_action_efficacy/readme/USAGE.md new file mode 100644 index 00000000000..1982d393dfe --- /dev/null +++ b/mgmtsystem_action_efficacy/readme/USAGE.md @@ -0,0 +1,5 @@ +Action Efficacy + +- Go to Management System → Actions +- Create new Action +- Store data on Efficacy tab diff --git a/mgmtsystem_action_efficacy/static/description/icon.png b/mgmtsystem_action_efficacy/static/description/icon.png new file mode 100644 index 00000000000..2ecc7042549 Binary files /dev/null and b/mgmtsystem_action_efficacy/static/description/icon.png differ diff --git a/mgmtsystem_action_efficacy/static/description/index.html b/mgmtsystem_action_efficacy/static/description/index.html new file mode 100644 index 00000000000..45387790790 --- /dev/null +++ b/mgmtsystem_action_efficacy/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +Management System - Action Efficacy + + + +
+

Management System - Action Efficacy

+ + +

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

+

This module add efficacy information for Management System Actions.

+

Action

+
    +
  • new tab in the Action form view to evaluate the efficacy of the +action. Changes are tracked.
  • +
+

Table of contents

+ +
+

Usage

+

Action Efficacy

+
    +
  • Go to Management System → Actions
  • +
  • Create new Action
  • +
  • Store data on Efficacy tab
  • +
+
+
+

Changelog

+
+

12.0.1.0.0 (2020-07-01)

+
    +
  • [INI] Initial development
  • +
+
+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Associazione PNLUG - Gruppo Odoo
  • +
+
+
+

Contributors

+ +
+
+

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.

+

This module is part of the OCA/management-system project on GitHub.

+

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

+
+
+
+ + diff --git a/mgmtsystem_action_efficacy/tests/__init__.py b/mgmtsystem_action_efficacy/tests/__init__.py new file mode 100644 index 00000000000..ccceccd935b --- /dev/null +++ b/mgmtsystem_action_efficacy/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_efficacy diff --git a/mgmtsystem_action_efficacy/tests/test_efficacy.py b/mgmtsystem_action_efficacy/tests/test_efficacy.py new file mode 100644 index 00000000000..603b9889961 --- /dev/null +++ b/mgmtsystem_action_efficacy/tests/test_efficacy.py @@ -0,0 +1,22 @@ +# Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo ) +# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo ) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _ +from odoo.exceptions import ValidationError +from odoo.tests import common + + +class TestActionEfficacy(common.TransactionCase): + def test_change_efficacy(self): + record = self.env["mgmtsystem.action"].search([])[0] + + record.efficacy_value = 50 + record._onchange_efficacy_value() + self.assertEqual(50, record.efficacy_value) + + with self.assertRaises(ValidationError) as e: + record.efficacy_value = 200 + record._onchange_efficacy_value() + + self.assertIn(_("Rating must be between 0 and 100"), str(e.exception)) diff --git a/mgmtsystem_action_efficacy/views/mgmtsystem_action_views.xml b/mgmtsystem_action_efficacy/views/mgmtsystem_action_views.xml new file mode 100644 index 00000000000..d4895012d83 --- /dev/null +++ b/mgmtsystem_action_efficacy/views/mgmtsystem_action_views.xml @@ -0,0 +1,28 @@ + + + + + + view.mgmtsystem.action + mgmtsystem.action + + + + + + + + + + + + + + +