@ -0,0 +1,48 @@ |
|||||
|
.. 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: (V18) Ranjith R |
||||
|
(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) 2025-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) 2025-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': '18.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','project_sms'], |
||||
|
'data': [ |
||||
|
'security/project_task_risk_management_odoo_groups.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/project_risk_incident_line_views.xml', |
||||
|
'views/task_risk_incident_line_views.xml', |
||||
|
'views/menu_actions.xml', |
||||
|
'views/menuitems.xml', |
||||
|
'views/project_project_views.xml', |
||||
|
'views/risks_project_views.xml', |
||||
|
'views/risk_type_views.xml', |
||||
|
'views/risk_category_views.xml', |
||||
|
'views/risk_response_views.xml', |
||||
|
'views/risk_tag_views.xml', |
||||
|
'views/risk_incident_views.xml', |
||||
|
'views/project_task_views.xml', |
||||
|
'wizard/risk_incident_simplified_views.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,6 @@ |
|||||
|
## Module <project_task_risk_management_odoo> |
||||
|
|
||||
|
#### 21.01.2025 |
||||
|
#### Version 18.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) 2025-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,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-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) 2025-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) 2025-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) 2025-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) 2025-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): |
||||
|
return [key for |
||||
|
key, val in type(self).state.selection] |
@ -0,0 +1,30 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-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,42 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-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) 2025-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) 2025-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) 2025-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">[('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: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 84 KiB |