diff --git a/okr/README.rst b/okr/README.rst new file mode 100644 index 00000000..37488a2e --- /dev/null +++ b/okr/README.rst @@ -0,0 +1,71 @@ +.. |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 + +=== +OKR +=== + +* This module ... + +Installation +============ + +To install this module, you need to: + +#. Just install the module. + +Configuration +============= + +To configure this module, you need to: + +#. ... + + +Usage +===== + +To use this module, you need to: + +#. ... + +.. 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..e8ff172f --- /dev/null +++ b/okr/__manifest__.py @@ -0,0 +1,14 @@ + +{ + 'name': 'OKR', + 'version': "17.0.1.0.0", + 'depends': ['base'], + 'application': True, + 'data': [ + 'security/ir.model.access.csv', + 'views/okr_views.xml', + 'views/okr_menu.xml', + 'views/okr_results_views.xml', + ], + 'license': 'LGPL-3', +} diff --git a/okr/models/__init__.py b/okr/models/__init__.py new file mode 100644 index 00000000..a0b61ce9 --- /dev/null +++ b/okr/models/__init__.py @@ -0,0 +1,2 @@ +from . import okr +from . import okr_results diff --git a/okr/models/okr.py b/okr/models/okr.py new file mode 100644 index 00000000..55baa1ea --- /dev/null +++ b/okr/models/okr.py @@ -0,0 +1,18 @@ +from odoo import models,fields + + +class Okr(models.Model): + _name = 'okr' + _description= 'Gestión de Okrs' + _order = "id desc" + + name= fields.Char(required=True,) + description = fields.Text() + area = fields.Selection([('i+d', 'I+D'),('aministracion','Administración'),('rrhh', 'Recursos Humanos'), ('ventas', 'Ventas'),('consultoria', 'Consultoria'),('mdea','Mesa de Ayuda'), ('adhoc','Adhoc')]) + number_q = fields.Integer(string='Número de Q') + progress = fields.Float(compute="_compute_progress") + type = fields.Selection([('commitment', 'Commitment'), ('inspiring', 'Inspiring')]) + weight = fields.Float() + responsible = fields.Many2one('res.users') + target = fields.Integer(required=True, default=0) + users_id = fields.Many2one('res.users') diff --git a/okr/models/okr_results.py b/okr/models/okr_results.py new file mode 100644 index 00000000..f9667b03 --- /dev/null +++ b/okr/models/okr_results.py @@ -0,0 +1,27 @@ +from odoo import api, models,fields + + +class OkrResults(models.Model): + _name = 'okr.results' + _description= 'Resultados Okr' + _order = "id desc" + + name= fields.Char(required=True,) + description = fields.Text() + area = fields.Selection([('i+d', 'I+D'),('aministracion','Administración'),('rrhh', 'Recursos Humanos'), ('ventas', 'Ventas'),('consultoria', 'Consultoria'),('mdea','Mesa de Ayuda'), ('adhoc','Adhoc')]) + number_q = fields.Integer(string='Número de Q') + progress = fields.Float(compute="_compute_progress") + type = fields.Selection([('commitment', 'Commitment'), ('inspiring', 'Inspiring')]) + weight = fields.Float() + responsible = fields.Many2one('res.users') + target = fields.Integer(required=True, default=0) + users_id = fields.Many2one('res.users') + results = fields.Integer() + + @api.depends('results', 'target') + def _compute_progress(self): + for rec in self: + if rec.results and rec.target: + rec.progress = (rec.results / rec.target)*100 + else: + rec.progress = 0 diff --git a/okr/security/ir.model.access.csv b/okr/security/ir.model.access.csv new file mode 100644 index 00000000..0638325d --- /dev/null +++ b/okr/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink + +okr.access_okr,access_okr,okr.model_okr,base.group_user,1,1,1,1 +access_okr_results,okr_results,model_okr_results,base.group_user,1,1,1,1 diff --git a/okr/static/description/icon.png b/okr/static/description/icon.png new file mode 100644 index 00000000..14f13d0b Binary files /dev/null and b/okr/static/description/icon.png differ diff --git a/okr/views/okr_menu.xml b/okr/views/okr_menu.xml new file mode 100644 index 00000000..bb0e2f94 --- /dev/null +++ b/okr/views/okr_menu.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/okr/views/okr_results_views.xml b/okr/views/okr_results_views.xml new file mode 100644 index 00000000..b2b449fc --- /dev/null +++ b/okr/views/okr_results_views.xml @@ -0,0 +1,62 @@ + + + + + + Okr Results + okr.results + + + + + + + + okir.view.form + okr.results + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
diff --git a/okr/views/okr_views.xml b/okr/views/okr_views.xml new file mode 100644 index 00000000..717954d1 --- /dev/null +++ b/okr/views/okr_views.xml @@ -0,0 +1,57 @@ + + + + + Okr + okr + + + + + okr.view.tree + okr + + + + + + + + + + + + okir.view.form + okr + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +