Skip to content

Commit

Permalink
[MIG] project_risk: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HeliconiaSolutions committed Nov 26, 2024
1 parent ed70b22 commit bbb9bfd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
15 changes: 8 additions & 7 deletions project_risk/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project Risk
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bf67547766c9b6f136f648f71b0fc51cb63d1e3b79a963b3607e9d299c261e8b
!! source digest: sha256:664cf32c22df39d2fd8461271b9c234598087f196c2e72ab609066f72deaa368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Project Risk
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
:target: https://github.com/OCA/project/tree/13.0/project_risk
:target: https://github.com/OCA/project/tree/16.0/project_risk
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_risk
:target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_risk
: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/project&target_branch=13.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -51,7 +51,7 @@ To define risks for your projects:
#. Go to *Project > Risks*;
#. create a new risk;
#. the rating is automatically calculated based on this risk matrix:
.. image:: https://raw.githubusercontent.com/OCA/project/13.0/project_risk/static/description/matrix.png
.. image:: https://raw.githubusercontent.com/OCA/project/16.0/project_risk/static/description/matrix.png
:alt: Risk matrix
#. set the state to 'Active' if the risk is in effect;
#. set the state to 'Closed' if the risk is processed or e.g. completely avoided.
Expand All @@ -70,7 +70,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/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 <https://github.com/OCA/project/issues/new?body=module:%20project_risk%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_risk%0Aversion:%2016.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.

Expand All @@ -81,6 +81,7 @@ Authors
~~~~~~~

* Onestein
* Heliconia Solutions

Contributors
~~~~~~~~~~~~
Expand All @@ -104,6 +105,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/project <https://github.com/OCA/project/tree/13.0/project_risk>`_ project on GitHub.
This module is part of the `OCA/project <https://github.com/OCA/project/tree/16.0/project_risk>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 3 additions & 2 deletions project_risk/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 2024 Heliconia Solutions
{
"name": "Project Risk",
"summary": "MOR risk management method",
"author": "Onestein, Odoo Community Association (OCA)",
"author": "Onestein, Heliconia Solutions, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/project",
"category": "Project Management",
"version": "13.0.1.0.0",
"version": "16.0.1.0.0",
"depends": ["project"],
"data": [
"security/ir_model_access.xml",
Expand Down
4 changes: 4 additions & 0 deletions project_risk/migration_version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Version of migration time : 13.0.1.0.0
Odoo 16 Version : 16.0.1.0.0
==================================================
6 changes: 4 additions & 2 deletions project_risk/models/project_project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright 2019 Onestein
# Copyright 2020 Manuel Calero - Tecnativa
# Copyright 2024 Heliconia Solutions
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models
Expand All @@ -20,8 +21,9 @@ def _compute_risk_count(self):

def view_risk(self):
self.ensure_one()
action = self.env.ref("project_risk.project_risk_action")
action = action.read()[0]
action = self.env["ir.actions.act_window"]._for_xml_id(
"project_risk.project_risk_action"
)
action["context"] = {"default_project_id": self.id}
action["domain"] = [("project_id", "=", self.id)]
return action
12 changes: 6 additions & 6 deletions project_risk/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,9 +366,9 @@ <h1 class="title">Project Risk</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bf67547766c9b6f136f648f71b0fc51cb63d1e3b79a963b3607e9d299c261e8b
!! source digest: sha256:664cf32c22df39d2fd8461271b9c234598087f196c2e72ab609066f72deaa368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/project/tree/13.0/project_risk"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_risk"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/project&amp;target_branch=13.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/project/tree/16.0/project_risk"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_risk"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/project&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>With this module you can manage your projects risk using the MOR method.</p>
<p><a class="reference external" href="https://www.axelos.com/best-practice-solutions/mor/what-is-mor">https://www.axelos.com/best-practice-solutions/mor/what-is-mor</a></p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -402,7 +401,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
</li>
<li><dl class="first docutils">
<dt>the rating is automatically calculated based on this risk matrix:</dt>
<dd><img alt="Risk matrix" class="first last" src="https://raw.githubusercontent.com/OCA/project/13.0/project_risk/static/description/matrix.png" />
<dd><img alt="Risk matrix" class="first last" src="https://raw.githubusercontent.com/OCA/project/16.0/project_risk/static/description/matrix.png" />
</dd>
</dl>
</li>
Expand All @@ -425,7 +424,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/project/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_risk%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_risk%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -434,6 +433,7 @@ <h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>Onestein</li>
<li>Heliconia Solutions</li>
</ul>
</div>
<div class="section" id="contributors">
Expand All @@ -454,7 +454,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/13.0/project_risk">OCA/project</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/16.0/project_risk">OCA/project</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions project_risk/tests/test_project_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


class TestProjectRisk(TransactionCase):
def setUp(self):
super().setUp()
def setUpClass(self):
super().setUpClass()
self.project = self.env["project.project"].create(
{"name": "Research &amp; Development", "privacy_visibility": "followers"}
)
Expand Down
4 changes: 1 addition & 3 deletions project_risk/views/project_project_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
position="inside"
>
<div>
<a name="view_risk" type="object">
Risks
</a>
<a name="view_risk" type="object">Risks</a>
</div>
</xpath>
</field>
Expand Down

0 comments on commit bbb9bfd

Please sign in to comment.