Reach the next rank and gain a very nice unicorn !
diff --git a/addons/gamification/models/res_users.py b/addons/gamification/models/res_users.py
index daa9d4bc1e1..a0ca65ced45 100644
--- a/addons/gamification/models/res_users.py
+++ b/addons/gamification/models/res_users.py
@@ -96,6 +96,14 @@ class Users(models.Model):
if old_rank != user.rank_id:
user._rank_changed()
+ def _get_next_rank(self):
+ """ For fresh users with 0 karma that don't have a rank_id and next_rank_id yet
+ this method returns the first karma rank (by karma ascending). This acts as a
+ default value in related views.
+
+ TDE FIXME in post-12.4: make next_rank_id a non-stored computed field correctly computed """
+ return self.next_rank_id or (not self.rank_id and self.env['gamification.karma.rank'].search([], order="karma_min ASC", limit=1))
+
def get_gamification_redirection_data(self):
"""
Hook for other modules to add redirect button(s) in new rank reached mail
diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml
index 9aac0a4376d..c28712f06ac 100644
--- a/addons/website_profile/views/website_profile.xml
+++ b/addons/website_profile/views/website_profile.xml
@@ -258,12 +258,11 @@
-
- Next rank:
-
- 40%
-
-
+
+ Next rank:
+
+ 40%
+
@@ -315,17 +314,21 @@
"
-
+
"
/
-
+
xp
diff --git a/addons/website_slides/views/website_slides_templates_homepage.xml b/addons/website_slides/views/website_slides_templates_homepage.xml
index 828b6d2dfa8..1a176c361a3 100644
--- a/addons/website_slides/views/website_slides_templates_homepage.xml
+++ b/addons/website_slides/views/website_slides_templates_homepage.xml
@@ -396,14 +396,14 @@