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

[MIG] okr_management: Migration to 17.0 #165

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

mem-adhoc
Copy link
Contributor

Task: 34208

@roboadhoc
Copy link

@mem-adhoc mem-adhoc force-pushed the 17.0-t-34208-mem-okr branch 3 times, most recently from e93c565 to 33939b5 Compare February 1, 2024 14:08
@mem-adhoc mem-adhoc force-pushed the 17.0-t-34208-mem-okr branch from 33939b5 to 0afab6e Compare February 7, 2024 13:02
from odoo.exceptions import UserError

class OkrKeyResult(models.Model):
_name = 'okr.key.result'
Copy link
Contributor

Choose a reason for hiding this comment

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

usar "." cuando es un submodelo, "_" cuando es parte del nombre (por ej "key_result")


name = fields.Char()
description = fields.Text()
objective =fields.Text()
Copy link
Contributor

Choose a reason for hiding this comment

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

El objective, deberia ser un objective_id relacionado al modelo okr.objective

from odoo.exceptions import UserError

class OkrManagement(models.Model):
_name = 'okr.management'
Copy link
Contributor

Choose a reason for hiding this comment

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

Esto tendira que ser el modelo okr.objective

Comment on lines +14 to +17
progress= fields.Integer(
compute='_compute_okr_progress',
store = False,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Aca son necesarios 3 campos:
Target que es el puntaje a obtener (esta mas abajo, eso esta bien)
Resultado (es el resultado parcial, este falta)
Progress esta bien y es computado pero creo que lo estas usando como el campo anterior (Resultado)

importance = fields.Integer()#importancia dentro del kr
target = fields.Integer()#objetivo esperado

@api.depends('peso', 'target')
Copy link
Contributor

Choose a reason for hiding this comment

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

Faltan dependencias a resultado (campo que no existe)

La dependdencia a peso esta bien pero el campo no existe

Comment on lines +22 to +27
def _compute_okr_progress(self):
#mejorar codigo
prog = 0
for rec in self:
if rec.importance and rec.target:
prog = rec.importance
Copy link
Contributor

Choose a reason for hiding this comment

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

Revisar formula del excel para implementar aca

('inspiracional', 'Inspiracional'),
],
)
result = fields.Float()
Copy link
Contributor

Choose a reason for hiding this comment

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

Result deberia ser computado y tener en cuenta el progreso que tienen los key result

'license': 'AGPL-3',
'images': [
],
'depends': [
Copy link
Contributor

Choose a reason for hiding this comment

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

Agregar dependencia minimo a modulo 'base'

],
'installable': True,
'auto_install': False,
'application': False,
Copy link
Contributor

Choose a reason for hiding this comment

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

'application': True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants