-
Notifications
You must be signed in to change notification settings - Fork 30
[NEW] okr_management: new module #153
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
base: 17.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
| 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', | ||
| 'sequence': 14, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ¿Para que serviría esta secuencia? |
||
| 'website': 'www.adhoc.com.ar', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||
| } | ||
| 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 |
| 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' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. borrar strings |
||
| responsible_id = fields.One2many('hr.employee') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
| 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' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| 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' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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') | ||
There was a problem hiding this comment.
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?