Skip to content
Snippets Groups Projects
  1. May 12, 2023
    • Florian Charlier's avatar
      [FIX] gamification: update internal users goals · 6c77dd82
      Florian Charlier authored
      
      For performance reason, we avoided computing goals for the set of users
      that didn't log in recently (See ec0c0f29).
      However, users can stay logged in for a while without having a new "log
      in event" (password asked), such that active internal users can keep
      old values in their challenges when reports are sent, which is not good.
      
      Until an improvement can be implemented in master, we drop this time
      constraint for active internal users.
      
      A test is added, checking the behavior of the method called by the cron.
      
      Task-3226408
      
      closes odoo/odoo#119271
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      6c77dd82
  2. Aug 27, 2020
    • Thibault Delavallée's avatar
      [REF] various: use helper to create tests users · 910559c0
      Thibault Delavallée authored
      PURPOSE
      
      Lessen use of mail-specific calls and variables
      
      SPECIFICATIONS
      
      Use mail_new_test_user tool in tests, lessening use of mail-specific context
      keys in tests.
      
      LINKS
      
      Task ID-2326281 (context keys use cleaning)
      PR odoo/odoo#56631
      PR odoo/enterprise#12707
      910559c0
  3. Nov 06, 2019
  4. Nov 05, 2019
    • Yannick Tivisse's avatar
    • Thibault Delavallée's avatar
      [IMP] gamification: merge karma related tests in the same file and improve rank tests · c5b7e000
      Thibault Delavallée authored
      Purpose is to have all karma related tests in the same file to ease finding
      them back. Some tweaking is also done like using a savepoint case and ensuring
      tests can always be re-run.
      
      LINKS
      
      Task ID 2003505
      PR #34594
      c5b7e000
    • Patrick Hoste's avatar
      [IMP] gamification: track karma change on users · bfbc7c6a
      Patrick Hoste authored
      PURPOSE
      
      Allow karma gain tracking enabling notably display of top users based on
      weekly / monthly gain in website profile.
      
      SPECIFCIATIONS
      
      Each time a user gains karma a record is created in the gamification karma
      tracking model. Scheduled activity runs to consolidate the records into
      monthly gain records to avoid having crowdy table and unnecessary noise
      in karma gain.
      
      This model is made private and only accessible through some dedicated
      compute methods / controllers used in website profile.
      
      In website profile module buttons are added to see users ranking based
      on their total karma (like before) but also by last week and last month
      gains (using the newly introduced tracking model).
      
      LINKS
      
      Task ID 2003505
      PR #34594
      bfbc7c6a
  5. Jul 24, 2019
    • Jeremy Kersten's avatar
      [FIX] gamification: perf on write karma_min on gamification.karma.rank · 8a80efd7
      Jeremy Kersten authored
      
      This commits avoid to call recompute when you write on the rank without
      touch the karma_min value.
      
      On write on karma_min, we have 2 cases:
      - Rank order are the same, just need to recompute the rank for the user
      that could be impacted. Eg. if karma_min changes from 45 to 50, we need
      to recheck for all user between 45 and 50 their new rank.
      - Rank order are not the same, we need to recompute for all users.
      (could be still improved if needed)
      
      When you recompute the rank on a list of users, depending of the number of
      users (bulk if more than 3 * number of rank) we check for each user what is
      the new rank, or for each rank whats is the new users.
      
      task-internal
      
      No way to edit a rank on the prod server. Lock sql -> crash server
      
      closes odoo/odoo#34835
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      8a80efd7
  6. Aug 22, 2018
    • Christophe Monniez's avatar
      [FIX] gamification: compute badge stats wihtout error · 3ff0948b
      Christophe Monniez authored
      Since 960360af, when computing badge stats, a datetime was compared to a
      string leading to a traceback.  e.g. when clicking in employess >
      badges.
      
      Also, due to a typo, the compute method was assigning the stats result
      to the wrong attributes.  e.g. 'stats_my_this_month' instead of
      'stat_my_this_month'.
      
      With this commit, the above mentioned issues are fixed and a test is
      covering these issues to avoid regression.
      3ff0948b
  7. Aug 05, 2016
  8. Oct 07, 2015
  9. Jun 02, 2015
  10. Jan 15, 2015
  11. Apr 16, 2014
  12. Dec 24, 2013
  13. Dec 18, 2013
Loading