@ -0,0 +1,47 @@ |
|||
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
|||
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
:alt: License: LGPL-3 |
|||
|
|||
Project Task Risk Management Odoo |
|||
====================== |
|||
* Project Task Risk Management Odoo. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed. |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL-3). |
|||
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: (V17) Ashwin A |
|||
* Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,33 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import models |
|||
from . import wizard |
|||
from odoo import fields |
|||
|
|||
|
|||
def _post_init_hook(env): |
|||
""" While Installing the module linking users into Group Named Technical/Use Stages on Project""" |
|||
project_stage_group = env.ref('project.group_project_stages') |
|||
users = env['res.users'].search([('share', '=', False)]) |
|||
for i in users: |
|||
if i not in project_stage_group.users: |
|||
project_stage_group.write({'users': [(fields.Command.link(i.id))]}) |
@ -0,0 +1,58 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'Project Task Risk Management Odoo', |
|||
'version': '17.0.1.0.0', |
|||
'category': 'Extra Tools', |
|||
'summary': 'Risk Management For Project & Tasks', |
|||
'description': """This module allows project manager and users to |
|||
manage risk on the project and tasks with risk incident creation from |
|||
project and tasks.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['project'], |
|||
'data': [ |
|||
'security/project_task_risk_management_odoo.xml', |
|||
'security/ir.model.access.csv', |
|||
'wizard/risk_incident_wiz.xml', |
|||
'views/project_risk_analysis.xml', |
|||
'views/task_risk_analysis.xml', |
|||
'views/menu_actions.xml', |
|||
'views/menuitems.xml', |
|||
'views/project_project.xml', |
|||
'views/risks_project.xml', |
|||
'views/risk_type.xml', |
|||
'views/risk_category.xml', |
|||
'views/risk_response.xml', |
|||
'views/risk_tags.xml', |
|||
'views/risk_incident.xml', |
|||
'views/project_task.xml', |
|||
], |
|||
'post_init_hook': '_post_init_hook', |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': True, |
|||
} |
@ -0,0 +1,7 @@ |
|||
## Module <project_task_risk_management_odoo> |
|||
|
|||
#### 22.01.2024 |
|||
#### Version 17.0.1.0.0 |
|||
#### ADD |
|||
- Initial commit for Project Task Risk Management Odoo |
|||
|
@ -0,0 +1,31 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import project_project |
|||
from . import project_risk_incident_line |
|||
from . import project_task |
|||
from . import risk_category |
|||
from . import risk_incidents |
|||
from . import risks_project |
|||
from . import risk_response |
|||
from . import risk_tags |
|||
from . import risk_type |
|||
from . import task_risk_incident_line |
@ -0,0 +1,46 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models, _ |
|||
|
|||
|
|||
class ProjectIncident(models.Model): |
|||
""" Inherits project. project and add fields""" |
|||
_inherit = 'project.project' |
|||
|
|||
risk_incident_line = fields.One2many('project.risk.incident.line', |
|||
'incident_order_id', |
|||
string='Risk Incident Lines', |
|||
help='Risk Incident Lines') |
|||
|
|||
def create_incident_wiz(self): |
|||
""" Returns Wizard""" |
|||
return { |
|||
'name': _('Create Incident'), |
|||
'type': 'ir.actions.act_window', |
|||
'view_mode': 'form', |
|||
'res_model': 'risk.incident.simplified', |
|||
'target': 'new', |
|||
'context': ( |
|||
{'default_user_id': self.user_id.id, |
|||
'default_project_id': self.id}) |
|||
} |
|||
|
@ -0,0 +1,42 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskIncident(models.Model): |
|||
""" Model for Project Risk Incident Line""" |
|||
_name = 'project.risk.incident.line' |
|||
|
|||
incident_order_id = fields.Many2one('project.project', |
|||
string='Risk Reference', |
|||
help='Reference of the Risk') |
|||
risk = fields.Many2one('risks.project', string='Risk', |
|||
help='Select Risk', required=True) |
|||
des = fields.Char(string="Description", help='Description of the project risk') |
|||
category = fields.Many2one('risk.category', string='Category', |
|||
required=True, help='Category of the risk') |
|||
risk_response = fields.Many2one('risk.response', string='Risk Response', |
|||
required=True, help='Response of the risk') |
|||
risk_type = fields.Many2one('risk.type', string='Risk Type', required=True, |
|||
help='Type of the risk') |
|||
probability = fields.Float(string='Probability(%)', help='Probability of the risk incident in percentage') |
|||
tag_ids = fields.Many2many('risk.tag', string='Tags', help='Risk Tag') |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models, _ |
|||
|
|||
|
|||
class ProjectTasksRisk(models.Model): |
|||
""" Inherits project task and adding fields """ |
|||
_inherit = 'project.task' |
|||
|
|||
task_risk_incident_line = fields.One2many('task.risk.incident.line', |
|||
'task_incident_order_id', |
|||
string='Risk Incident Lines', |
|||
help='Risk Incident Lines') |
|||
|
|||
def task_create_incident_wiz(self): |
|||
""" Returns Wizard""" |
|||
return { |
|||
'name': _('Create Incident'), |
|||
'type': 'ir.actions.act_window', |
|||
'view_mode': 'form', |
|||
'res_model': 'risk.incident.simplified', |
|||
'target': 'new', |
|||
'context': ( |
|||
{'default_user_id': self.project_id.user_id.id, |
|||
'default_project_id': self.project_id.id}) |
|||
} |
@ -0,0 +1,30 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskCategory(models.Model): |
|||
""" Risk Category Model """ |
|||
_name = 'risk.category' |
|||
|
|||
name = fields.Char(string='Name', help='Name of Risk Category') |
|||
code = fields.Char(string='Code', help='Code of Risk Category') |
@ -0,0 +1,52 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskIncidents(models.Model): |
|||
""" Risk Incident """ |
|||
_name = 'risk.incident' |
|||
_inherit = ['mail.thread', 'mail.activity.mixin'] |
|||
_rec_name = 'risk_incident' |
|||
|
|||
risk_incident = fields.Char(string='Title', tracking=True, required=True, help='Risk Incident Name') |
|||
project_id = fields.Many2one('project.project', string='Project', |
|||
tracking=True, help='Project of the Risk Incident') |
|||
user_id = fields.Many2one('res.users', string='Assigned to', |
|||
help='Select user', |
|||
tracking=True, default=lambda self: self.env.user) |
|||
deadline = fields.Date(string='Deadline', tracking=True, help='Deadline of the Risk Incident') |
|||
tag_ids = fields.Many2many('risk.tag', string='Tags', tracking=True, help='Risk Tag') |
|||
partner_id = fields.Many2one('res.partner', string='Customer', |
|||
tracking=True, help='Partner of the Risk Incident') |
|||
state = fields.Selection( |
|||
[('new', 'New'), ('to_do', 'To Do'), |
|||
('advanced', 'Advanced'), ('progress', 'In Progress'), |
|||
('done', 'Done'), ('cancel', 'Cancelled')], |
|||
string='Status', default='new', tracking=True, help='states', |
|||
group_expand='_group_expand_states') |
|||
note = fields.Text(string='Description', help='Description') |
|||
incident_image = fields.Binary(string='Incident Image', help='Image') |
|||
|
|||
def _group_expand_states(self, state, domain, order): |
|||
return [key for |
|||
key, val in type(self).state.selection] |
@ -0,0 +1,30 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskResponse(models.Model): |
|||
"""Model for Risk Response """ |
|||
_name = 'risk.response' |
|||
|
|||
name = fields.Char(string='Name', help='Name of Risk Response') |
|||
code = fields.Char(string='Code', help='Code of Risk Response') |
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from random import randint |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskTags(models.Model): |
|||
""" Model for Risk Tag """ |
|||
_name = "risk.tag" |
|||
_description = "Risk Tags" |
|||
|
|||
def _get_default_color(self): |
|||
""" Selecting Color for Tags""" |
|||
return randint(1, 11) |
|||
|
|||
name = fields.Char('Tag Name', required=True, translate=True, help='Name of Risk tag') |
|||
color = fields.Integer('Color', default=_get_default_color, help='Select Color of Risk Tag') |
|||
|
|||
_sql_constraints = [ |
|||
('name_uniq', 'unique (name)', "Tag name already exists !"), |
|||
] |
@ -0,0 +1,30 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskTypes(models.Model): |
|||
"""Model for Risk Type """ |
|||
_name = 'risk.type' |
|||
|
|||
name = fields.Char(string='Name', help='Name of Risk Type') |
|||
code = fields.Char(string='Code', help='Code of Risk Type') |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class Risks(models.Model): |
|||
""" Model for Risk Projects """ |
|||
_name = 'risks.project' |
|||
_inherit = ['mail.thread', 'mail.activity.mixin'] |
|||
_rec_name = 'risk_name' |
|||
|
|||
risk_name = fields.Char(string='Name', tracking=True, help='Risk Name') |
|||
code = fields.Char(string='Code', tracking=True, help='Risk code') |
|||
risk_quantification = fields.Selection([ |
|||
('low', 'Low'), |
|||
('medium', 'Medium'), |
|||
('high', 'High')], default='low', string='Risk Quantification', |
|||
help='Risk qualification types', |
|||
tracking=True) |
|||
category_id = fields.Many2one('risk.category', string='Category', |
|||
help='Select Category', |
|||
tracking=True) |
|||
risk_type = fields.Many2one('risk.type', string='Risk Type', tracking=True, |
|||
help='Risk Type') |
|||
risk_response = fields.Many2one('risk.response', string='Risk Response', |
|||
help='Risk response', |
|||
tracking=True) |
|||
tag_ids = fields.Many2many('risk.tag', string='Tags', help='Risk tags') |
|||
note = fields.Text(string='Internal Notes', tracking=True, help='Risk Note') |
@ -0,0 +1,43 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class RiskIncident(models.Model): |
|||
""" model for task_risk_incident_line """ |
|||
_name = 'task.risk.incident.line' |
|||
|
|||
task_incident_order_id = fields.Many2one('project.task', |
|||
string='Risk Reference', |
|||
help='Reference of the risk') |
|||
risk = fields.Many2one('risks.project', string='Risk', required=True, |
|||
help='Select Risk') |
|||
des = fields.Char(string="Description", help='Description of the Task Risk') |
|||
category = fields.Many2one('risk.category', string='Category', |
|||
required=True, help='Category of the risk') |
|||
risk_response = fields.Many2one('risk.response', string='Risk Response', |
|||
required=True, help='Response of the risk') |
|||
risk_type = fields.Many2one('risk.type', string='Risk Type', required=True, |
|||
help='Type of the risk') |
|||
probability = fields.Float(string='Probability(%)', |
|||
help='Probability of the risk incident in percentage') |
|||
tag_ids = fields.Many2many('risk.tag', string='Tags', help='Risk tags') |
|
@ -0,0 +1,36 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record model="ir.module.category" id="module_project_task_risk_management_odoo"> |
|||
<field name="name">Project & Tasks Risk Management</field> |
|||
<field name="description">Category for Risk Management</field> |
|||
</record> |
|||
|
|||
<record id="group_risk_management_user" model="res.groups"> |
|||
<field name="name">User</field> |
|||
<field name="category_id" ref="module_project_task_risk_management_odoo"/> |
|||
</record> |
|||
|
|||
<record id="group_risk_management_admin" model="res.groups"> |
|||
<field name="name">Manager</field> |
|||
<field name="category_id" ref="module_project_task_risk_management_odoo"/> |
|||
<field name="implied_ids" eval="[(4, ref('group_risk_management_user'))]"/> |
|||
</record> |
|||
|
|||
<record id="rule_own_doc" model="ir.rule"> |
|||
<field name="name">View Own Docs</field> |
|||
<field ref="model_risks_project" name="model_id"/> |
|||
<field name="domain_force">['|',('user_id', '=', user.id),('create_uid', |
|||
'=', user.id)] |
|||
</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('project_task_risk_management_odoo.group_risk_management_user'))]"/> |
|||
</record> |
|||
|
|||
<record id="rule_all_doc" model="ir.rule"> |
|||
<field name="name">View All Docs</field> |
|||
<field ref="model_risks_project" name="model_id"/> |
|||
<field name="domain_force">[(1, '=', 1)]</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('project_task_risk_management_odoo.group_risk_management_admin'))]"/> |
|||
</record> |
|||
</odoo> |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,109 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Action Risks Project --> |
|||
<record id="action_risk_project" model="ir.actions.act_window"> |
|||
<field name="name">Risks</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risks.project</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Incident |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Risk Types --> |
|||
<record id="action_risk_types" model="ir.actions.act_window"> |
|||
<field name="name">Risk Types</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risk.type</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Type |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Risk Categories --> |
|||
<record id="action_risk_categories" model="ir.actions.act_window"> |
|||
<field name="name">Risk Categories</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risk.category</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Categories |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Risk Response --> |
|||
<record id="action_risk_response" model="ir.actions.act_window"> |
|||
<field name="name">Risk Response</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risk.response</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Response |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Risk Tags --> |
|||
<record id="action_risk_tags" model="ir.actions.act_window"> |
|||
<field name="name">Risk Tags</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risk.tag</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Tags |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Risk Incidents--> |
|||
<record id="action_risk_incident" model="ir.actions.act_window"> |
|||
<field name="name">Risk Incidents</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">risk.incident</field> |
|||
<field name="view_mode">kanban,tree,form,graph,pivot</field> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create Your First Project Risk Incidents |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Project Risk Analysis--> |
|||
<record id="action_project_risk_analysis" model="ir.actions.act_window"> |
|||
<field name="name">Project Risk Analysis</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">project.risk.incident.line</field> |
|||
<field name="view_mode">tree,graph,pivot</field> |
|||
<field name="view_id" ref="project_risk_incident_line_view_tree"/> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create First Project Risk Analysis |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Action Task Risk Analysis--> |
|||
<record id="action_task_risk_analysis" model="ir.actions.act_window"> |
|||
<field name="name">Task Risk Analysis</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">task.risk.incident.line</field> |
|||
<field name="view_mode">tree,graph,pivot</field> |
|||
<field name="view_id" ref="task_risk_incident_line_view_tree"/> |
|||
<field name="context">{'search_default_available':1}</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create First Task Risk Analysis |
|||
</p> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,93 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- MenuItem Risk Management --> |
|||
<menuitem id="menu_risk_management_root" |
|||
web_icon="project_task_risk_management_odoo,static/description/icon.png" |
|||
name="Risk Management" |
|||
sequence="20"/> |
|||
<!-- MenuItem Project--> |
|||
<menuitem id="menu_project_root" |
|||
name="Project" |
|||
parent="menu_risk_management_root" |
|||
sequence="20"/> |
|||
<!-- MenuItem Projects--> |
|||
<menuitem id="menu_project" |
|||
name="Projects" |
|||
parent="menu_project_root" |
|||
action="project.open_view_project_all_group_stage" |
|||
sequence="20"/> |
|||
<!-- MenuItem Tasks--> |
|||
<menuitem id="menu_tasks" |
|||
name="Tasks" |
|||
parent="menu_project_root" |
|||
action="project.action_view_all_task" |
|||
sequence="20"/> |
|||
<!-- MenuItem Risk Incident--> |
|||
<menuitem id="menu_risk_incident_root" |
|||
name="Risk Incident" |
|||
parent="menu_risk_management_root" |
|||
sequence="22"/> |
|||
<!-- MenuItem Risk Incident--> |
|||
<menuitem id="menu_risk_incident_project" |
|||
name="Risk Incident" |
|||
parent="menu_risk_incident_root" |
|||
action="action_risk_incident" |
|||
sequence="20"/> |
|||
<!-- MenuItem Reporting--> |
|||
<menuitem id="menu_reporting_root" |
|||
name="Reporting" |
|||
groups="project_task_risk_management_odoo.group_risk_management_admin" |
|||
parent="menu_risk_management_root" |
|||
sequence="24"/> |
|||
<!-- MenuItem Project Risk Analysis--> |
|||
<menuitem id="menu_project_risk_analysis" |
|||
name="Project Risk Analysis" |
|||
parent="menu_reporting_root" |
|||
action="action_project_risk_analysis" |
|||
sequence="20"/> |
|||
<!-- MenuItem Task Risk Analysis--> |
|||
<menuitem id="menu_task_risk_analysis" |
|||
name="Task Risk Analysis" |
|||
parent="menu_reporting_root" |
|||
action="action_task_risk_analysis" |
|||
sequence="20"/> |
|||
<!-- MenuItem Configuration--> |
|||
<menuitem id="menu_configuration_root" |
|||
name="Configuration" |
|||
parent="menu_risk_management_root" |
|||
sequence="26"/> |
|||
<!-- MenuItem Risks--> |
|||
<menuitem id="menu_risks_project" |
|||
name="Risks" |
|||
parent="menu_configuration_root" |
|||
action="action_risk_project" |
|||
sequence="20"/> |
|||
<!-- MenuItem Risk Types--> |
|||
<menuitem id="menu_risks_types" |
|||
name="Risk Types" |
|||
groups="project_task_risk_management_odoo.group_risk_management_admin" |
|||
parent="menu_configuration_root" |
|||
action="action_risk_types" |
|||
sequence="22"/> |
|||
<!-- MenuItem Risk Categories--> |
|||
<menuitem id="menu_risks_category" |
|||
name="Risk Categories" |
|||
groups="project_task_risk_management_odoo.group_risk_management_admin" |
|||
parent="menu_configuration_root" |
|||
action="action_risk_categories" |
|||
sequence="24"/> |
|||
<!-- MenuItem Risk Response--> |
|||
<menuitem id="menu_risks_response" |
|||
name="Risk Response" |
|||
groups="project_task_risk_management_odoo.group_risk_management_admin" |
|||
parent="menu_configuration_root" |
|||
action="action_risk_response" |
|||
sequence="26"/> |
|||
<!-- MenuItem Risk Tags--> |
|||
<menuitem id="menu_risks_tags" |
|||
name="Risk Tags" |
|||
groups="project_task_risk_management_odoo.group_risk_management_admin" |
|||
parent="menu_configuration_root" |
|||
action="action_risk_tags" |
|||
sequence="28"/> |
|||
</odoo> |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<!-- Project Form View --> |
|||
<record id="edit_project" model="ir.ui.view"> |
|||
<field name="name">project.project.view.form.inherit.project.task.risk.management.odoo</field> |
|||
<field name="model">project.project</field> |
|||
<field name="inherit_id" ref="project.edit_project"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//header/button[@name='%(project.project_share_wizard_action)d']" |
|||
position="before"> |
|||
<button name="create_incident_wiz" |
|||
string="Create Incident" class="oe_highlight" |
|||
type="object"/> |
|||
</xpath> |
|||
<xpath expr="//notebook/page[@name='settings']" |
|||
position="after"> |
|||
<page name="register" string="Risk Register"> |
|||
<field name="risk_incident_line"> |
|||
<tree string="Risk Incident Lines" |
|||
editable="bottom"> |
|||
<field name="incident_order_id" invisible="1"/> |
|||
<field name="risk"/> |
|||
<field name="des"/> |
|||
<field name="category"/> |
|||
<field name="risk_response"/> |
|||
<field name="risk_type"/> |
|||
<field name="tag_ids" widget="many2many_tags" |
|||
options="{'color_field': 'color'}"/> |
|||
<field name="probability"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,43 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Project Risk Incident Line Tree View--> |
|||
<record id="project_risk_incident_line_view_tree" model="ir.ui.view"> |
|||
<field name="name">project.risk.incident.line.view.tree</field> |
|||
<field name="model">project.risk.incident.line</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Risk Incident Lines" create="0"> |
|||
<field name="incident_order_id" invisible="1"/> |
|||
<field name="risk"/> |
|||
<field name="des"/> |
|||
<field name="category"/> |
|||
<field name="risk_response"/> |
|||
<field name="risk_type"/> |
|||
<field name="tag_ids" widget="many2many_tags" |
|||
options="{'color_field': 'color'}"/> |
|||
<field name="probability"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<!-- Project Risk Incident Line Pivot View--> |
|||
<record id="project_risk_incident_line_view_pivot" model="ir.ui.view"> |
|||
<field name="name">project.risk.incident.line.view.pivot</field> |
|||
<field name="model">project.risk.incident.line</field> |
|||
<field name="arch" type="xml"> |
|||
<pivot string="Project Risks Analysis" display_quantity="1" sample="1"> |
|||
<field name="risk" type="row"/> |
|||
<field name="probability" type="col"/> |
|||
</pivot> |
|||
</field> |
|||
</record> |
|||
<!-- Project Risk Incident Line. Graph View--> |
|||
<record id="project_risk_incident_line_view_graph" model="ir.ui.view"> |
|||
<field name="name">project.risk.incident.line.view.graph</field> |
|||
<field name="model">project.risk.incident.line</field> |
|||
<field name="arch" type="xml"> |
|||
<graph string="Project Risks Analysis" sample="1"> |
|||
<field name="risk"/> |
|||
<field name="probability"/> |
|||
</graph> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,41 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<!-- Project Task Form View--> |
|||
<record id="view_task_form2" model="ir.ui.view"> |
|||
<field name="name">project.task.view.form.inherit.project.task.risk.management.odoo</field> |
|||
<field name="model">project.task</field> |
|||
<field name="inherit_id" ref="project.view_task_form2"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//header" |
|||
position="inside"> |
|||
<button name="task_create_incident_wiz" |
|||
string="Create Incident" class="oe_highlight" |
|||
type="object"/> |
|||
</xpath> |
|||
<xpath expr="//notebook/page[@name='extra_info']" |
|||
position="after"> |
|||
<page name="register" |
|||
string="Risk Register"> |
|||
<field name="task_risk_incident_line"> |
|||
<tree string="Risk Incident Lines" |
|||
editable="bottom"> |
|||
<field name="task_incident_order_id" |
|||
invisible="1"/> |
|||
<field name="risk"/> |
|||
<field name="des"/> |
|||
<field name="category"/> |
|||
<field name="risk_response"/> |
|||
<field name="risk_type"/> |
|||
<field name="tag_ids" |
|||
widget="many2many_tags" |
|||
options="{'color_field': 'color'}"/> |
|||
<field name="probability"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |