Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions gestion_okr/README.rst
Original file line number Diff line number Diff line change
@@ -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

<record model="ir.module.category" id="category_portal_app">
<field name="name">Portal app</field>
<field name="parent_id" ref="portal_backend.category_portal_advanced"/>
</record>

Group to give access to Portal Backend users to use that app:

.. code-block:: xml

<record id="group_portal_backend_app" model="res.groups">
<field name="name">Portal app</field>
<field name="category_id" ref="category_portal_app"/>
</record>

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

<record id="group_portal_backend_app_2" model="res.groups">
<field name="name">Portal app 2</field>
<field name="category_id" ref="category_portal_app"/>
<field name="implied_ids" eval="[Command.link(ref('group_portal_backend_app'))]"/>
</record>


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
<https://github.com/ingadhoc/miscellaneous/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.
5 changes: 5 additions & 0 deletions gestion_okr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import models
22 changes: 22 additions & 0 deletions gestion_okr/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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,
}
3 changes: 3 additions & 0 deletions gestion_okr/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import okr_objetive
from . import okr_kr

28 changes: 28 additions & 0 deletions gestion_okr/models/okr_kr.py
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions gestion_okr/models/okr_objetive.py
Original file line number Diff line number Diff line change
@@ -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")

3 changes: 3 additions & 0 deletions gestion_okr/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions gestion_okr/views/okr_kr_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="open_view_okr_kr" model="ir.actions.act_window">
<field name="name">KRs</field>
<field name="res_model">okr.kr</field>
<field name="view_mode">tree,kanban,form,activity</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="view_id" eval="False"/>
</record>
</data>
</odoo>
13 changes: 13 additions & 0 deletions gestion_okr/views/okr_objetive_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="open_view_okr_objetives" model="ir.actions.act_window">
<field name="name">Objetivos</field>
<field name="res_model">okr.objetives</field>
<field name="view_mode">tree,kanban,form,activity</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="view_id" eval="False"/>
</record>
</data>
</odoo>
29 changes: 29 additions & 0 deletions gestion_okr/views/okr_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>

<menuitem
id="menu_okr"
name="OKRs"
groups="base.group_user"
sequence="20"/>
<!-- agregar un web icon -->

<menuitem
id="menu_okr_objetives"
name="Objetivos"
parent="menu_okr"
groups="base.group_user"
action="open_view_okr_objetives"
sequence="1"/>

<menuitem
id="menu_okr_kr"
name="KRs"
parent="menu_okr"
groups="base.group_user"
action="open_view_okr_kr"
sequence="2"/>

</data>
</odoo>