Skip to content

Commit

Permalink
Merge PR #706 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed May 18, 2024
2 parents 7984eed + 4b8ceb4 commit 1af4324
Show file tree
Hide file tree
Showing 15 changed files with 973 additions and 0 deletions.
87 changes: 87 additions & 0 deletions base_tier_validation_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
==============================
Base Tier Validation - Reports
==============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/15.0/base_tier_validation_report
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-15-0/server-ux-15-0-base_tier_validation_report
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/250/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provide additional reports related to Tier Validation

#. My Reviews (pending, approved, rejected)
#. All Reviews (pending, approved, rejected)

These reports are accessible in Dashboard app

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-ux/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-ux/issues/new?body=module:%20base_tier_validation_report%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Ecosoft

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

* Kitti U. <[email protected]>
* Pimolnat Suntian <[email protected]>

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-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu|

This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/15.0/base_tier_validation_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions base_tier_validation_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
20 changes: 20 additions & 0 deletions base_tier_validation_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Base Tier Validation - Reports",
"summary": "Reports related to tier validation",
"version": "16.0.1.0.1",
"category": "Tools",
"website": "https://github.com/OCA/server-ux",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["base_tier_validation"],
"data": [
"security/groups.xml",
"reports/tier_review_report.xml",
],
"application": False,
"installable": True,
"development_status": "Beta",
"maintainers": ["kittiu"],
}
93 changes: 93 additions & 0 deletions base_tier_validation_report/i18n/base_tier_validation_report.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_tier_validation_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: base_tier_validation_report
#: model:ir.actions.act_window,name:base_tier_validation_report.tier_review_all_action
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_review_report_all
msgid "All Reviews"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Approved"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Done By"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.actions.act_window,name:base_tier_validation_report.tier_review_my_action
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_review_report_my
msgid "My Reviews"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__next_review
msgid "Next Review"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_form
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_tree
msgid "Open Resource"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Rejected"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Requested By"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_name
msgid "Resource Name"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_ref
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Resource Ref"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_type
msgid "Resource Type"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_validation_report
msgid "Reviews"
msgstr ""

#. module: base_tier_validation_report
#: model:res.groups,name:base_tier_validation_report.group_see_all_reviews
msgid "See All Tier Reviews"
msgstr ""

#. module: base_tier_validation_report
#: model:ir.model,name:base_tier_validation_report.model_tier_review
msgid "Tier Review"
msgstr ""

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "To Review"
msgstr ""
105 changes: 105 additions & 0 deletions base_tier_validation_report/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_tier_validation_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-03 11:09+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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: base_tier_validation_report
#: model:ir.actions.act_window,name:base_tier_validation_report.tier_review_all_action
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_review_report_all
msgid "All Reviews"
msgstr "Tutte le approvazioni"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Approved"
msgstr "Approvato"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Done By"
msgstr "Eseguito Da"

#. module: base_tier_validation_report
#: model:ir.actions.act_window,name:base_tier_validation_report.tier_review_my_action
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_review_report_my
msgid "My Reviews"
msgstr "Le mie approvazioni"

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__next_review
msgid "Next Review"
msgstr "Prossima revisione"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_form
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_tree
msgid "Open Resource"
msgstr "Risorsa aperta"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Rejected"
msgstr "Rifiutato"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Requested By"
msgstr "Richiesta Da"

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_name
msgid "Resource Name"
msgstr "Nome risorsa"

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_ref
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "Resource Ref"
msgstr "Rif. risorsa"

#. module: base_tier_validation_report
#: model:ir.model.fields,field_description:base_tier_validation_report.field_tier_review__resource_type
msgid "Resource Type"
msgstr "Tipo risorsa"

#. module: base_tier_validation_report
#: model:ir.ui.menu,name:base_tier_validation_report.menu_tier_validation_report
msgid "Reviews"
msgstr "Approvazioni"

#. module: base_tier_validation_report
#: model:res.groups,name:base_tier_validation_report.group_see_all_reviews
msgid "See All Tier Reviews"
msgstr "Vedi tutte le approvazioni"

#. module: base_tier_validation_report
#: model:ir.model,name:base_tier_validation_report.model_tier_review
msgid "Tier Review"
msgstr "Livello Approvazione"

#. module: base_tier_validation_report
#: model_terms:ir.ui.view,arch_db:base_tier_validation_report.tier_review_report_search
msgid "To Review"
msgstr "Da approvare"

#~ msgid "Display Name"
#~ msgstr "Nome Visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
3 changes: 3 additions & 0 deletions base_tier_validation_report/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import tier_review
54 changes: 54 additions & 0 deletions base_tier_validation_report/models/tier_review.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class TierReview(models.Model):
_inherit = "tier.review"

resource_ref = fields.Reference(
selection="_selection_resource_ref",
compute="_compute_resource_ref",
store=True,
readonly=True,
compute_sudo=True,
)
resource_type = fields.Selection(
selection="_selection_resource_ref",
compute_sudo=True,
)
resource_name = fields.Char(
compute="_compute_resource_ref",
compute_sudo=True,
)
next_review = fields.Char(
compute="_compute_resource_ref",
compute_sudo=True,
)

def _selection_resource_ref(self):
models = self.env["tier.definition"]._get_tier_validation_model_names()
res = [(m, self.env[m]._description) for m in models]
return res

@api.depends("model", "res_id")
def _compute_resource_ref(self):
for rec in self:
rec.resource_ref = (
"%s,%s" % (rec.model, rec.res_id) if rec.res_id else False
)
rec.resource_name = rec.resource_ref.display_name
rec.resource_type = rec.model
rec.next_review = rec.resource_ref.next_review

def action_open_resource_ref(self):
self.ensure_one()
return {
"name": self.resource_ref.display_name,
"type": "ir.actions.act_window",
"view_type": "form",
"view_mode": "form",
"res_model": self.model,
"res_id": self.res_id,
}
2 changes: 2 additions & 0 deletions base_tier_validation_report/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Kitti U. <[email protected]>
* Pimolnat Suntian <[email protected]>
6 changes: 6 additions & 0 deletions base_tier_validation_report/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module provide additional reports related to Tier Validation

#. My Reviews (pending, approved, rejected)
#. All Reviews (pending, approved, rejected)

These reports are accessible in Dashboard app
Loading

0 comments on commit 1af4324

Please sign in to comment.