Skip to content

Commit ad46e17

Browse files
[ADD] gestion_okr: nuevo modulo gestion OKRs MNP
1 parent ed68ba1 commit ad46e17

10 files changed

+218
-0
lines changed

gestion_okr/README.rst

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.. |company| replace:: ADHOC SA
2+
3+
.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
4+
:alt: ADHOC SA
5+
:target: https://www.adhoc.com.ar
6+
7+
.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png
8+
9+
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
10+
:target: https://www.gnu.org/licenses/agpl
11+
:alt: License: AGPL-3
12+
13+
===========
14+
Gestion OKR
15+
===========
16+
17+
Este módulo realiza el manejo de la gestion de OKRs de Adhoc sa.
18+
19+
.. code-block:: xml
20+
21+
<record model="ir.module.category" id="category_portal_app">
22+
<field name="name">Portal app</field>
23+
<field name="parent_id" ref="portal_backend.category_portal_advanced"/>
24+
</record>
25+
26+
Group to give access to Portal Backend users to use that app:
27+
28+
.. code-block:: xml
29+
30+
<record id="group_portal_backend_app" model="res.groups">
31+
<field name="name">Portal app</field>
32+
<field name="category_id" ref="category_portal_app"/>
33+
</record>
34+
35+
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:
36+
37+
.. code-block:: xml
38+
39+
<record id="group_portal_backend_app_2" model="res.groups">
40+
<field name="name">Portal app 2</field>
41+
<field name="category_id" ref="category_portal_app"/>
42+
<field name="implied_ids" eval="[Command.link(ref('group_portal_backend_app'))]"/>
43+
</record>
44+
45+
46+
Installation
47+
============
48+
49+
Only install the module.
50+
51+
Configuration
52+
=============
53+
54+
There is nothing to configure.
55+
56+
Usage
57+
=====
58+
59+
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
60+
:alt: Try me on Runbot
61+
:target: http://runbot.adhoc.com.ar/
62+
63+
Bug Tracker
64+
===========
65+
66+
Bugs are tracked on `GitHub Issues
67+
<https://github.com/ingadhoc/miscellaneous/issues>`_. In case of trouble, please
68+
check there if your issue has already been reported. If you spotted it first,
69+
help us smashing it by providing a detailed and welcomed feedback.
70+
71+
Credits
72+
=======
73+
74+
Images
75+
------
76+
77+
* |company| |icon|
78+
79+
Contributors
80+
------------
81+
82+
Maintainer
83+
----------
84+
85+
|company_logo|
86+
87+
This module is maintained by the |company|.
88+
89+
To contribute to this module, please visit https://www.adhoc.com.ar.

gestion_okr/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##############################################################################
2+
# For copyright and license notices, see __manifest__.py file in module root
3+
# directory
4+
##############################################################################
5+
from . import models

gestion_okr/__manifest__.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
'name': 'Gestion OKR',
3+
'version': "16.0.1.0.0",
4+
'category': 'Base',
5+
'sequence': 14,
6+
'summary': '',
7+
'author': 'ADHOC SA',
8+
'website': 'www.adhoc.com.ar',
9+
'license': 'AGPL-3',
10+
'depends': [
11+
'hr',
12+
],
13+
'data': [
14+
'security/ir.model.access.csv',
15+
'views/okr_objetive_views.xml',
16+
'views/okr_kr_views.xml',
17+
'views/okr_views.xml',
18+
],
19+
'installable': True,
20+
'auto_install': False,
21+
'application': False,
22+
}

gestion_okr/models/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import okr_objetive
2+
from . import okr_kr
3+

gestion_okr/models/okr_kr.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from odoo import api, models, fields
2+
3+
4+
class OkrKR(models.Model):
5+
_name = 'okr.kr'
6+
_description = "key results"
7+
8+
name = fields.Char(required=True, copy=False, string='Nombre del kr')
9+
objective_id = fields.Many2one('okr.objetives', string="Objetivo del kr", required=True)
10+
progress = fields.Float(string='Progreso',compute="_compute_progress")
11+
weight = fields.Integer(string='Peso', required=True)
12+
target = fields.Integer(string='Target', required=True)
13+
result = fields.Integer(string="Resultados")
14+
user_id = fields.Many2one('res.users', string="Responsable del kr", required=True)
15+
user_ids = fields.Many2many('res.users', string="Interesados")
16+
action_plan = fields.Char(string="Plan de acción")
17+
comments = fields.Char(string="Comentarios")
18+
dependencies = fields.Many2many('hr.department', string="Interdependencias con otras áreas")
19+
made_in_q = fields.Char(string="Realizados en el Q")
20+
notes_next_q = fields.Char(string="Notas para el próximo Q")
21+
22+
@api.depends('result', 'target')
23+
def _compute_progress(self):
24+
for rec in self:
25+
if rec.result and rec.target:
26+
rec.progress = (rec.result / rec.target)*100
27+
else:
28+
rec.progress = False

gestion_okr/models/okr_objetive.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from odoo import api, models, fields
2+
3+
4+
class OkrObjetives(models.Model):
5+
_name = 'okr.objetives'
6+
_description = "Objetives"
7+
8+
name = fields.Char(required=True, copy=False, string='Nombre de objetivo')
9+
description = fields.Char(string='Descripcion')
10+
date_start = fields.Date(string='Fecha de inicio', help="Fecha de inicio del objetivo.")
11+
date_stop = fields.Date(string='Fecha de fin', help="Fecha de fin del objetivo.")
12+
department_id = fields.Many2one('hr.department', string="Departamento del objetivo")
13+
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2+
access_okr_objetives,okr_objetives,model_okr_objetives,base.group_user,1,1,1,1
3+
access_okr_kr,okr_kr,model_okr_kr,base.group_user,1,1,1,1

gestion_okr/views/okr_kr_views.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<data>
4+
<record id="open_view_okr_kr" model="ir.actions.act_window">
5+
<field name="name">KRs</field>
6+
<field name="res_model">okr.kr</field>
7+
<field name="view_mode">tree,kanban,form,activity</field>
8+
<field name="domain">[]</field>
9+
<field name="context">{}</field>
10+
<field name="view_id" eval="False"/>
11+
</record>
12+
</data>
13+
</odoo>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<data>
4+
<record id="open_view_okr_objetives" model="ir.actions.act_window">
5+
<field name="name">Objetivos</field>
6+
<field name="res_model">okr.objetives</field>
7+
<field name="view_mode">tree,kanban,form,activity</field>
8+
<field name="domain">[]</field>
9+
<field name="context">{}</field>
10+
<field name="view_id" eval="False"/>
11+
</record>
12+
</data>
13+
</odoo>

gestion_okr/views/okr_views.xml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<data>
4+
5+
<menuitem
6+
id="menu_okr"
7+
name="OKRs"
8+
groups="base.group_user"
9+
sequence="20"/>
10+
<!-- agregar un web icon -->
11+
12+
<menuitem
13+
id="menu_okr_objetives"
14+
name="Objetivos"
15+
parent="menu_okr"
16+
groups="base.group_user"
17+
action="open_view_okr_objetives"
18+
sequence="1"/>
19+
20+
<menuitem
21+
id="menu_okr_kr"
22+
name="KRs"
23+
parent="menu_okr"
24+
groups="base.group_user"
25+
action="open_view_okr_kr"
26+
sequence="2"/>
27+
28+
</data>
29+
</odoo>

0 commit comments

Comments
 (0)