From 2ae9d590e1ea44690528d9c663dc6ba5311a29ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 10 Nov 2021 07:40:09 +0000 Subject: [PATCH] [MOV] gamification: reorder and rename view files Purpose of this commit is to rename and reorder views by main model. It allows to better understand module organization and find views one may have to update. Task-2678295 Part-of: odoo/odoo#79599 --- addons/gamification/__manifest__.py | 15 ++- ...challenge.py => gamification_challenge.py} | 0 .../views/gamification_badge_user_views.xml | 38 ++++++ ...badge.xml => gamification_badge_views.xml} | 38 +----- .../gamification_challenge_line_views.xml | 15 +++ ...e.xml => gamification_challenge_views.xml} | 33 +---- .../gamification_goal_definition_views.xml | 97 +++++++++++++++ .../{goal.xml => gamification_goal_views.xml} | 115 +++--------------- .../views/gamification_karma_rank_views.xml | 7 -- addons/gamification/views/res_users_views.xml | 8 ++ 10 files changed, 188 insertions(+), 178 deletions(-) rename addons/gamification/models/{challenge.py => gamification_challenge.py} (100%) create mode 100644 addons/gamification/views/gamification_badge_user_views.xml rename addons/gamification/views/{badge.xml => gamification_badge_views.xml} (82%) create mode 100644 addons/gamification/views/gamification_challenge_line_views.xml rename addons/gamification/views/{challenge.xml => gamification_challenge_views.xml} (89%) create mode 100644 addons/gamification/views/gamification_goal_definition_views.xml rename addons/gamification/views/{goal.xml => gamification_goal_views.xml} (69%) diff --git a/addons/gamification/__manifest__.py b/addons/gamification/__manifest__.py index 724fa844fe1..f746a485af4 100644 --- a/addons/gamification/__manifest__.py +++ b/addons/gamification/__manifest__.py @@ -22,9 +22,15 @@ Both goals and badges are flexibles and can be adapted to a large range of modul 'data': [ 'wizard/update_goal.xml', 'wizard/grant_badge.xml', - 'views/badge.xml', - 'views/challenge.xml', - 'views/goal.xml', + 'views/res_users_views.xml', + 'views/gamification_karma_rank_views.xml', + 'views/gamification_karma_tracking_views.xml', + 'views/gamification_badge_views.xml', + 'views/gamification_badge_user_views.xml', + 'views/gamification_goal_views.xml', + 'views/gamification_goal_definition_views.xml', + 'views/gamification_challenge_views.xml', + 'views/gamification_challenge_line_views.xml', 'data/cron.xml', 'security/gamification_security.xml', 'security/ir.model.access.csv', @@ -32,9 +38,6 @@ Both goals and badges are flexibles and can be adapted to a large range of modul 'data/goal_base.xml', 'data/badge.xml', 'data/gamification_karma_rank_data.xml', - 'views/gamification_karma_rank_views.xml', - 'views/gamification_karma_tracking_views.xml', - 'views/res_users_views.xml', ], 'demo': [ 'data/gamification_karma_rank_demo.xml', diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/gamification_challenge.py similarity index 100% rename from addons/gamification/models/challenge.py rename to addons/gamification/models/gamification_challenge.py diff --git a/addons/gamification/views/gamification_badge_user_views.xml b/addons/gamification/views/gamification_badge_user_views.xml new file mode 100644 index 00000000000..d09d7f69e6e --- /dev/null +++ b/addons/gamification/views/gamification_badge_user_views.xml @@ -0,0 +1,38 @@ + + + + + Badge User Kanban View + gamification.badge.user + + + + + + + + + +
+
+
+ +
+
+

+ +

+ +

+
+

Granted by the

+
+
+
+
+
+
+
+
+ +
diff --git a/addons/gamification/views/badge.xml b/addons/gamification/views/gamification_badge_views.xml similarity index 82% rename from addons/gamification/views/badge.xml rename to addons/gamification/views/gamification_badge_views.xml index 539e5254a7e..127b49533e0 100644 --- a/addons/gamification/views/badge.xml +++ b/addons/gamification/views/gamification_badge_views.xml @@ -1,3 +1,4 @@ + @@ -162,41 +163,4 @@ - - - - - - Badge User Kanban View - gamification.badge.user - - - - - - - - - -
-
-
- -
-
-

- -

- -

-
-

Granted by the

-
-
-
-
-
-
-
-
diff --git a/addons/gamification/views/gamification_challenge_line_views.xml b/addons/gamification/views/gamification_challenge_line_views.xml new file mode 100644 index 00000000000..e73b1c6502b --- /dev/null +++ b/addons/gamification/views/gamification_challenge_line_views.xml @@ -0,0 +1,15 @@ + + + + + Challenge line list + gamification.challenge.line + + + + + + + + + diff --git a/addons/gamification/views/challenge.xml b/addons/gamification/views/gamification_challenge_views.xml similarity index 89% rename from addons/gamification/views/challenge.xml rename to addons/gamification/views/gamification_challenge_views.xml index b028ccb3391..f4c3d4be4fb 100644 --- a/addons/gamification/views/challenge.xml +++ b/addons/gamification/views/gamification_challenge_views.xml @@ -1,9 +1,10 @@ + Challenges List gamification.challenge - + @@ -12,26 +13,11 @@ - - gamification.goal - Related Goals - kanban,tree,form - {'search_default_group_by_definition': True, 'search_default_inprogress': True, 'search_default_challenge_id': active_id, 'default_challenge_id': active_id} - -

- No goal found -

- There is no goal associated to this challenge matching your search. - Make sure that your challenge is active and assigned to at least one user. -

-
-
- Challenge Form gamification.challenge -
+