Skip to content

Commit

Permalink
[MIG] okr: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-adhoc committed Feb 6, 2024
1 parent 4be2aeb commit 9492826
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
9 changes: 5 additions & 4 deletions okr/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "OKR",
"author": "Adhoc SA",
"version": "16.0.1.0",
"version": "17.0.1.0.0",
"depends": [
'base',
'hr',
],
"views":[
"data": [
'security/ir.model.access.csv',
'views/okr_objective_views.xml',
'views/okr_key_result_views.xml',
'views/okr_objective_views.xml.xml',
],
"license": "AGPL-3",
"installable": True,
"auto_install": False,
"application": False,
"application": True,
}
5 changes: 0 additions & 5 deletions okr/ir.model.access.csv

This file was deleted.

5 changes: 4 additions & 1 deletion okr/models/okr_key_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ class OkrKeyResult(models.Model):
@api.depends('result', 'target')
def _compute_progress(self):
for rec in self:
rec.progress = (rec.result / rec.target)*100
if rec.target:
rec.progress = (rec.result / rec.target)*100
else:
rec.progress = 0
3 changes: 3 additions & 0 deletions okr/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
okr.access_okr_objective,access_okr_objective,model_okr_objective,base.group_user,1,1,1,1
okr.access_okr_key_result,access_okr_key_result,model_okr_key_result,base.group_user,1,1,1,1
10 changes: 6 additions & 4 deletions okr/views/okr_key_result_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
<field name="result"/>
<field name="progress"/>
</group>
<page name="Comentarios">
<field name="comments"/>
</page>
<notebook>
<page name="Comentarios">
<field name="comments"/>
</page>
</notebook>
</form>
</field>
</record>
Expand All @@ -48,6 +50,6 @@
<field name='view_mode'>tree,form</field>
</record>

<menuitem id="menu_okr_key_result" action="action_okr_key_result" parent="menu_okr_objective"/>
<menuitem id="menu_okr_key_result" sequence="100" action="action_okr_key_result" parent="menu_okr_objective"/>

</odoo>
2 changes: 1 addition & 1 deletion okr/views/okr_objective_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
<field name='view_mode'>tree,form</field>
</record>

<menuitem id="menu_okr_objective" action="action_okr_objective"/>
<menuitem id="menu_okr_objective" sequence="100" action="action_okr_objective"/>

</odoo>

0 comments on commit 9492826

Please sign in to comment.