New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] project_categ_issue: Migrated to 10.0 #229
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d9b908f
[MIG] project_categ_issue: Migrated to 10.0
rigo1985 53a680c
Set 'author' and 'website' as Tecnativa
rigo1985 814cb91
.
rigo1985 559ea41
.
rigo1985 aa89dad
[MIG] project_categ_issue: Migrated to 10.0
rigo1985 2c83583
[MIG] project_categ: Migrated to 10.0
rigo1985 d578a20
[MIG] project_categ_issue: Migrated to 10.0
rigo1985 1a404fb
travis error
rigo1985 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
====================== | ||
Project Category Issue | ||
====================== | ||
|
||
* Adds to Issues the ability to limit selectable Categories to a Project's specific list. | ||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/140/10.0 | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
|
||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Daniel Reis | ||
* Rigoberto Martínez <rigo1985@gmail.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
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. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import project_categ_model | ||
# (c) 2013 Daniel Reis | ||
# (c) 2017 Rigoberto Martínez <rigo1985@gmail.com> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Copyright (C) 2013 Daniel Reis | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
# © 2013 Daniel Reis | ||
# © 2017 Rigoberto Martínez <rigo1985@gmail.com> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
'name': 'Per Project Configurable Categorie on Issues', | ||
'summary': 'Projects Issues can have an allowed category list', | ||
'version': '8.0.0.1.0', | ||
'version': '10.0.0.1.0', | ||
"category": "Project Management", | ||
'description': """\ | ||
Adds to Issues the ability to limit selectable Categories to a Proeject's | ||
specific list. | ||
""", | ||
'author': "Daniel Reis,Odoo Community Association (OCA)", | ||
'author': "Daniel Reis, Tecnativa, Odoo Community Association (OCA)", | ||
'website': 'https://www.tecnativa.com', | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'project_issue', | ||
'project_categ', | ||
], | ||
'data': [ | ||
'project_categ_view.xml', | ||
'views/project_categ_view.xml', | ||
], | ||
'installable': False, | ||
'installable': True, | ||
'auto_install': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013 Daniel Reis | ||
# © 2017 Rigoberto Martínez <rigo1985@gmail.com> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import project_categ_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013 Daniel Reis | ||
# © 2017 Rigoberto Martínez <rigo1985@gmail.com> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class ProjectProject(models.Model): | ||
_inherit = 'project.project' | ||
|
||
issue_tag_id = fields.Many2one('project.tags', | ||
string='Root Tag for Issues') | ||
|
||
|
||
class ProjectIssue(models.Model): | ||
_inherit = 'project.issue' | ||
|
||
tag_project = fields.Many2one('project.tags', string='Root Tag for Issues', | ||
compute='_compute_project_root_tag') | ||
|
||
@api.multi | ||
@api.depends('project_id') | ||
def _compute_project_root_tag(self): | ||
for issue in self: | ||
issue.tag_project = issue.project_id.issue_tag_id or False | ||
|
||
@api.onchange('project_id') | ||
def _onchange_project(self): | ||
super(ProjectIssue, self)._onchange_project_id() | ||
self.tag_ids &= self.project_id.issue_tag_id.child_ids |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<!-- Project form --> | ||
<record id="project_categ_issue_project_view_form" model="ir.ui.view"> | ||
<field name="name">project.categ.issue.project.view.form</field> | ||
<field name="model">project.project</field> | ||
<field name="inherit_id" ref="project.edit_project"/> | ||
<field name="arch" type="xml"> | ||
<field name="sequence" position="before"> | ||
<field name="issue_tag_id" domain="[('child_ids','!=',False)]"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<!-- Project Issue form --> | ||
<record id="project_categ_issue_project_issue_view_form" model="ir.ui.view"> | ||
<field name="name">project.categ.issue.project.issue.view.form</field> | ||
<field name="model">project.issue</field> | ||
<field name="inherit_id" ref="project_issue.project_issue_form_view"/> | ||
<field name="arch" type="xml"> | ||
<field name="project_id" position="replace" /> | ||
<field name="tag_ids" position="before" > | ||
<field name="project_id" context="{'default_use_issues':1}" groups="base.group_user" /> | ||
<field name="tag_project" invisible="1"/> | ||
</field> | ||
<field name="tag_ids" position="attributes"> | ||
<attribute name="domain">[('id', 'child_of', tag_project),('id','!=',tag_project)]</attribute> | ||
<attribute name="attrs">{'required':[('tag_project','!=',False)]}</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root Tag?
(shorter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the original field names- it eases eases version upgrades.