diff --git a/okr/README.rst b/okr/README.rst new file mode 100644 index 00000000..c6353876 --- /dev/null +++ b/okr/README.rst @@ -0,0 +1,72 @@ +.. |company| replace:: ADHOC SA + +.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png + :alt: ADHOC SA + :target: https://www.adhoc.com.ar + +.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png + +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +============== +ORK Management +============== + +This module add a new app and models that are use to plan and track the definition of OKR in a company and internal areas. + +New Models: + +* OKR Plan +* OKR Quarter +* OKR Objective +* OKR KR + +Installation +============ + +To install this module, you need to: + +#. Just install this module. + +Configuration +============= + +To configure this module, you need to: + +#. No configuration nedeed. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: http://runbot.adhoc.com.ar/ + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* |company| |icon| + +Contributors +------------ + +Maintainer +---------- + +|company_logo| + +This module is maintained by the |company|. + +To contribute to this module, please visit https://www.adhoc.com.ar. diff --git a/okr/__init__.py b/okr/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/okr/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/okr/__manifest__.py b/okr/__manifest__.py new file mode 100644 index 00000000..aa71578a --- /dev/null +++ b/okr/__manifest__.py @@ -0,0 +1,21 @@ +{ + 'name': 'OKR Management', + 'version': '16.0.1.0.0', + 'summary': 'Objectives and Key Results Methodology', + 'author': 'ADHOC SA', + 'maintainer': 'ADHOC SA', + 'contributors': [ + 'Katherine Zaoral (zaoral)', + ], + 'depends': [ + 'base', + 'hr', + ], + 'data': [ + 'views/okr_plan_views.xml', + 'security/ir.model.access.csv', + ], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/okr/demo/okr_plan_demo.xml b/okr/demo/okr_plan_demo.xml new file mode 100644 index 00000000..1b97c017 --- /dev/null +++ b/okr/demo/okr_plan_demo.xml @@ -0,0 +1,4 @@ + + + + diff --git a/okr/models/__init__.py b/okr/models/__init__.py new file mode 100644 index 00000000..a32d71c1 --- /dev/null +++ b/okr/models/__init__.py @@ -0,0 +1 @@ +from . import okr \ No newline at end of file diff --git a/okr/models/okr.py b/okr/models/okr.py new file mode 100644 index 00000000..9d190826 --- /dev/null +++ b/okr/models/okr.py @@ -0,0 +1,73 @@ +from odoo import fields, models + + +class OkrBase(models.AbstractModel): + + _name = 'okr.base' + _description = 'OKR Base' + + name = fields.Char() + description = fields.Text() + progress = fields.Integer() + comments = fields.Text() + + +class OkrPlan(models.Model): + + _name = 'okr.plan' + _description = 'OKR Plan By Year' + + name = fields.Char() # TODO auto compute with the year of the related quarters. + quarter_ids = fields.One2many('okr.quarter', 'plan_id') # Auto group by date? + + +class OkrQuarter(models.Model): + + _name = 'okr.quarter' + _description = 'OKR Quarter' + + plan_id = fields.Many2one('okr.plan') + scope = fields.Selection([('global', 'Global'), ('area', 'Area')], required=True) + department_id = fields.Many2one('hr.department') + + # TODO improve to manage period + name = fields.Char(required=True) # TODO Improve use display_name, Q1, Q2, Q3. Auto compute with dates? + date_start = fields.Date(required=True) + date_end = fields.Date(required=True) + + okr_ids = fields.One2many('okr.objective', 'quarter_id', string="OKRs") + half_q_presentation = fields.Char() + final_q_presentation = fields.Char() + + +class OkrObjective(models.Model): + + _name = 'okr.objective' + _description = 'OKR Objective' + _inherit = 'okr.base' + + quarter_id = fields.Many2one('okr.quarter') + weight = fields.Selection([ + ('commitment', 'Commitment'), + ('inspiracional', 'Inspiracional'), + ]) + kr_ids = fields.One2many('okr.kr', 'objective_id') + + +class OkrKr(models.Model): + + _name = 'okr.kr' + _description = 'OKR KR' + + _inherit = 'okr.base' + + objective_id = fields.Many2one('okr.objective') + weight = fields.Integer() + target = fields.Integer() + result = fields.Integer() + responsible_id = fields.Many2one('hr.employee') + team_ids = fields.Many2many('hr.employee') + interdependencies = fields.Text() + action_plan = fields.Text() + url_task_file = fields.Char() + notes_next_q = fields.Text() diff --git a/okr/security/ir.model.access.csv b/okr/security/ir.model.access.csv new file mode 100644 index 00000000..f84cf784 --- /dev/null +++ b/okr/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_okr_plan_user,access.okr.plan.user,model_okr_plan,base.group_user,1,1,1,1 +access_okr_quarter_user,access.okr.quarter.user,model_okr_quarter,base.group_user,1,1,1,1 +access_okr_objective_user,access.okr.objective.user,model_okr_objective,base.group_user,1,1,1,1 +access_okr_kr_user,access.okr.kr.user,model_okr_kr,base.group_user,1,1,1,1 diff --git a/okr/views/okr_plan_views.xml b/okr/views/okr_plan_views.xml new file mode 100644 index 00000000..12b7b3c2 --- /dev/null +++ b/okr/views/okr_plan_views.xml @@ -0,0 +1,29 @@ + + + + + okr.plan.view.form + okr.plan + +
+ + + + + + +
+
+
+ + + okr.plan + okr.plan + tree,form + + + + + + +