diff --git a/gestion_okr/README.rst b/gestion_okr/README.rst new file mode 100644 index 00000000..9d7db53b --- /dev/null +++ b/gestion_okr/README.rst @@ -0,0 +1,89 @@ +.. |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 + +=========== +Gestion OKR +=========== + +Este módulo realiza el manejo de la gestion de OKRs de Adhoc sa. + +.. code-block:: xml + + + Portal app + + + +Group to give access to Portal Backend users to use that app: + +.. code-block:: xml + + + Portal app + + + +You can also create a set of groups that inherit (or not) from each other, but the category always have to be "category_portal_app", because the views are different for each type of user. Here's an example: + +.. code-block:: xml + + + Portal app 2 + + + + + +Installation +============ + +Only install the module. + +Configuration +============= + +There is nothing to configure. + +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/gestion_okr/__init__.py b/gestion_okr/__init__.py new file mode 100644 index 00000000..d0337769 --- /dev/null +++ b/gestion_okr/__init__.py @@ -0,0 +1,5 @@ +############################################################################## +# For copyright and license notices, see __manifest__.py file in module root +# directory +############################################################################## +from . import models diff --git a/gestion_okr/__manifest__.py b/gestion_okr/__manifest__.py new file mode 100644 index 00000000..a4ceeb42 --- /dev/null +++ b/gestion_okr/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Gestion OKR', + 'version': "16.0.1.0.0", + 'category': 'Base', + 'sequence': 14, + 'summary': '', + 'author': 'ADHOC SA', + 'website': 'www.adhoc.com.ar', + 'license': 'AGPL-3', + 'depends': [ + 'hr', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/okr_objetive_views.xml', + 'views/okr_kr_views.xml', + 'views/okr_views.xml', + ], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/gestion_okr/models/__init__.py b/gestion_okr/models/__init__.py new file mode 100644 index 00000000..1bd4dea4 --- /dev/null +++ b/gestion_okr/models/__init__.py @@ -0,0 +1,3 @@ +from . import okr_objetive +from . import okr_kr + diff --git a/gestion_okr/models/okr_kr.py b/gestion_okr/models/okr_kr.py new file mode 100644 index 00000000..15c5c3de --- /dev/null +++ b/gestion_okr/models/okr_kr.py @@ -0,0 +1,28 @@ +from odoo import api, models, fields + + +class OkrKR(models.Model): + _name = 'okr.kr' + _description = "key results" + + name = fields.Char(required=True, copy=False, string='Nombre del kr') + objective_id = fields.Many2one('okr.objetives', string="Objetivo del kr", required=True) + progress = fields.Float(string='Progreso',compute="_compute_progress") + weight = fields.Integer(string='Peso', required=True) + target = fields.Integer(string='Target', required=True) + result = fields.Integer(string="Resultados") + user_id = fields.Many2one('res.users', string="Responsable del kr", required=True) + user_ids = fields.Many2many('res.users', string="Interesados") + action_plan = fields.Char(string="Plan de acción") + comments = fields.Char(string="Comentarios") + dependencies = fields.Many2many('hr.department', string="Interdependencias con otras áreas") + made_in_q = fields.Char(string="Realizados en el Q") + notes_next_q = fields.Char(string="Notas para el próximo Q") + + @api.depends('result', 'target') + def _compute_progress(self): + for rec in self: + if rec.result and rec.target: + rec.progress = (rec.result / rec.target)*100 + else: + rec.progress = False \ No newline at end of file diff --git a/gestion_okr/models/okr_objetive.py b/gestion_okr/models/okr_objetive.py new file mode 100644 index 00000000..eb496576 --- /dev/null +++ b/gestion_okr/models/okr_objetive.py @@ -0,0 +1,13 @@ +from odoo import api, models, fields + + +class OkrObjetives(models.Model): + _name = 'okr.objetives' + _description = "Objetives" + + name = fields.Char(required=True, copy=False, string='Nombre de objetivo') + description = fields.Char(string='Descripcion') + date_start = fields.Date(string='Fecha de inicio', help="Fecha de inicio del objetivo.") + date_stop = fields.Date(string='Fecha de fin', help="Fecha de fin del objetivo.") + department_id = fields.Many2one('hr.department', string="Departamento del objetivo") + diff --git a/gestion_okr/security/ir.model.access.csv b/gestion_okr/security/ir.model.access.csv new file mode 100644 index 00000000..9c0155ef --- /dev/null +++ b/gestion_okr/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_okr_objetives,okr_objetives,model_okr_objetives,base.group_user,1,1,1,1 +access_okr_kr,okr_kr,model_okr_kr,base.group_user,1,1,1,1 diff --git a/gestion_okr/views/okr_kr_views.xml b/gestion_okr/views/okr_kr_views.xml new file mode 100644 index 00000000..9a107396 --- /dev/null +++ b/gestion_okr/views/okr_kr_views.xml @@ -0,0 +1,13 @@ + + + + + KRs + okr.kr + tree,kanban,form,activity + [] + {} + + + + diff --git a/gestion_okr/views/okr_objetive_views.xml b/gestion_okr/views/okr_objetive_views.xml new file mode 100644 index 00000000..3a94f1b5 --- /dev/null +++ b/gestion_okr/views/okr_objetive_views.xml @@ -0,0 +1,13 @@ + + + + + Objetivos + okr.objetives + tree,kanban,form,activity + [] + {} + + + + diff --git a/gestion_okr/views/okr_views.xml b/gestion_okr/views/okr_views.xml new file mode 100644 index 00000000..91c809ee --- /dev/null +++ b/gestion_okr/views/okr_views.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + +