Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] okr_management: new module #153

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from
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
1 change: 1 addition & 0 deletions okr_management/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions okr_management/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
'name': 'OKR Management',
'version': "17.0.1.0.0",
'category': 'Base',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Es correcta esta categoría?

'sequence': 14,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Para que serviría esta secuencia?

'website': 'www.adhoc.com.ar',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Es necesario el website?

'license': 'AGPL-3',
'depends': [
'hr',
],
'installable': True,
'auto_install': False,
'application': True,
}
3 changes: 3 additions & 0 deletions okr_management/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import okr_kr
from . import okr_objective
from . import okr_quarter
23 changes: 23 additions & 0 deletions okr_management/models/okr_kr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from odoo import models, fields, api

class OkrKr(models.Model):
_name = 'okr.kr'
_description = 'okr.kr'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar la descripción, que no se llame igual que la descripción técnica del modelo


name = fields.Char(string='Resume', required=True)
description = fields.Char(string='Description', required=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrar string

objective_id = fields.Many2one('okr.objective', required=True)
progress = fields.Float(string='Progress', compute='_compute_progress')
importance = fields.Float(string='Importante')
target = fields.Float(string='Target')
result = fields.Float(string='Result')
Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrar strings

responsible_id = fields.One2many('hr.employee')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Falta el many2one en hr.employee

teammate_ids = fields.Many2many('hr.employee')
action_plan = fields.Text(string='Action Plan')
#code = fields.Char(size=4, required=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrar comentario


@api.depends('importance', 'result')
def _compute_progress(self):
for record in self:
record.progress = 100 if self.result >= self.target else self.result / self.target

20 changes: 20 additions & 0 deletions okr_management/models/okr_objective.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from odoo import models, fields, api

class OkrObjective(models.Model):
_name = 'okr.objective'
_description = 'okr.objective'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar la descripción, que no se llame igual que la descripción técnica del modelo.


name = fields.Char(string='Resume', required=True)
description = fields.Char(string='Description', required=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrar string

objective_type = fields.Selection([('inspirational', 'Inspirational'), ('commitment', 'Commitment')], required=True, default='inspirational')
kr_ids = fields.One2many('okr.kr', 'objective_id')
progress = fields.Float(compute='_compute_progress')
responsible_id = fields.One2many('hr.employee')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Falta el many2one en hr.employee

teammate_ids = fields.Many2many('hr.employee')
quarter_id = fields.Many2one('okr.quarter')
#prefix_code = fields.Char()

@api.depends('kr_ids.progress')
def _compute_progress(self):
for record in self:
record.progress = 0 # TODO
13 changes: 13 additions & 0 deletions okr_management/models/okr_quarter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import models, fields

class OkrQuarter(models.Model):
_name = 'okr.quarter'
_description = 'okr.quarter'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar la descripción, que no se llame igual que la descripción técnica del modelo.


name = fields.Char(string='Quarter', required=True)
description = fields.Char(string='Description', required=True)
start_date = fields.Date(string='Start Date', required=True)
end_date = fields.Date(string='End Date', required=True)
Comment on lines +8 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrar strings


department_id = fields.One2many('hr.department')
objective_ids = fields.One2many('okr.objective')