Skip to content

Commit

Permalink
[IMP] project_task_pull_request_state: remove
Browse files Browse the repository at this point in the history
legacy code
  • Loading branch information
Volodiay616 committed Nov 30, 2023
1 parent f98d3a6 commit b74a2b1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 43 deletions.
15 changes: 2 additions & 13 deletions project_task_pull_request_state/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project Task Pull Request State
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:951df0ec8374f1e1e197e823fd817db96506895e22765fd050db1b3ae3936697
!! source digest: sha256:2d6812718ac28df52f19c3dae0a74cc8debc3ac02fe77b6a4c2989f82f58619b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -71,7 +71,7 @@ Authors
Contributors
------------

- Cetmix <@cetmix.com>
- Cetmix https://cetmix.com/

Maintainers
-----------
Expand All @@ -86,17 +86,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.

.. |maintainer-CetmixGitDrone| image:: https://github.com/CetmixGitDrone.png?size=40px
:target: https://github.com/CetmixGitDrone
:alt: CetmixGitDrone
.. |maintainer-Volodiay622| image:: https://github.com/Volodiay622.png?size=40px
:target: https://github.com/Volodiay622
:alt: Volodiay622

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

|maintainer-CetmixGitDrone| |maintainer-Volodiay622|

This module is part of the `OCA/project <https://github.com/OCA/project/tree/16.0/project_task_pull_request_state>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 0 additions & 1 deletion project_task_pull_request_state/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"category": "Project Management",
"website": "https://github.com/OCA/project",
"author": "Cetmix, Odoo Community Association (OCA)",
"maintainers": ["CetmixGitDrone", "Volodiay622"],
"license": "AGPL-3",
"application": False,
"installable": True,
Expand Down
2 changes: 1 addition & 1 deletion project_task_pull_request_state/models/project_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ProjectTaskState(models.Model):

pr_state = fields.Selection(
selection=lambda self: self._selection_pr_state(),
track_visibility="onchange",
tracking=True,
copy=False,
string="PR State",
compute="_compute_pr_state",
Expand Down
25 changes: 2 additions & 23 deletions project_task_pull_request_state/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Cetmix OU 2023
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0).
from odoo import api, fields, models
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
Expand All @@ -9,28 +9,7 @@ class ResConfigSettings(models.TransientModel):
pr_state_default = fields.Selection(
selection=lambda self: self.env["project.task"]._selection_pr_state(),
string="Default PR State",
config_parameter="project_task_pull_request_state.pr_state_default",
help="Default PR state that will be set when "
"PR URI is added to a task in this project",
)

def set_values(self):
res = super(ResConfigSettings, self).set_values()
ICPSudo = self.env["ir.config_parameter"].sudo()
ICPSudo.set_param(
"project_task_pull_request_state.pr_state_default", self.pr_state_default
)
return res

@api.model
def get_values(self):
res = super(ResConfigSettings, self).get_values()
ICPSudo = self.env["ir.config_parameter"].sudo()

# Get Many2many from config
pr_state_default = ICPSudo.get_param(
"project_task_pull_request_state.pr_state_default"
)
if pr_state_default:
res.update({"pr_state_default": pr_state_default})

return res
2 changes: 1 addition & 1 deletion project_task_pull_request_state/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Cetmix <@cetmix.com>
- Cetmix <https://cetmix.com/>
6 changes: 2 additions & 4 deletions project_task_pull_request_state/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Project Task Pull Request State</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:951df0ec8374f1e1e197e823fd817db96506895e22765fd050db1b3ae3936697
!! source digest: sha256:2d6812718ac28df52f19c3dae0a74cc8debc3ac02fe77b6a4c2989f82f58619b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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_task_pull_request_state"><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_task_pull_request_state"><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>This module extends functionality of the <strong>project_task_pull_request</strong>
Expand Down Expand Up @@ -418,7 +418,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Cetmix &lt;&#64;cetmix.com&gt;</li>
<li>Cetmix <a class="reference external" href="https://cetmix.com/">https://cetmix.com/</a></li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -428,8 +428,6 @@ <h2><a class="toc-backref" href="#toc-entry-6">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>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/CetmixGitDrone"><img alt="CetmixGitDrone" src="https://github.com/CetmixGitDrone.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/Volodiay622"><img alt="Volodiay622" src="https://github.com/Volodiay622.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/16.0/project_task_pull_request_state">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>
Expand Down

0 comments on commit b74a2b1

Please sign in to comment.